Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\radix-tree.c Create Date:2022-07-28 06:12:58
Last Modify:2022-05-21 10:04:37 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Extend a radix tree so it can store key @index.

Proto:static int radix_tree_extend(struct xarray *root, gfp_t gfp, unsigned long index, unsigned int shift)

Type:int

Parameter:

TypeParameterName
struct xarray *root
gfp_tgfp
unsigned longindex
unsigned intshift
426  maxshift = shift
427  When index > The maximum index which can be stored in a radix tree cycle
428  maxshift += adix-tree API starts here **
430  entry = Dependency order vs. p above. (xa_head)
431  If Not entry && ( Not is_idr(root) || root_tag_get(root, The IDR API does not expose the tagging functionality of the radix tree* to users. Use tag 0 to track whether a node has free space below it.)) Then Go to out
434  Do
435  node = This assumes that the caller has performed appropriate preallocation, and* that the caller has pinned this thread of control to the current CPU.
437  If Not node Then Return -ENOMEM
440  If is_idr(root) Then
446  Else
449  If root_tag_get(root, tag) Then tag_set(node, tag, 0)
454  BUG_ON(shift > BITS_PER_LONG)
459  nr_values = 1
465  slots[0] = entry
466  entry = node_to_entry(node)
467  cu_assign_pointer() - assign to RCU-protected pointer*@p: pointer to assign to*@v: value to assign (publish)* Assigns the specified value to the specified RCU-protected* pointer, ensuring that any concurrent RCU readers will see* any prior initialization(xa_head, entry)
468  shift += adix-tree API starts here **
469  When shift <= maxshift cycle
470  out :
471  Return maxshift + adix-tree API starts here **
Caller
NameDescribe
__radix_tree_create
idr_get_free