Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:idr_get_free

Proto:void __rcu **idr_get_free(struct xarray *root, struct radix_tree_iter *iter, gfp_t gfp, unsigned long max)

Type:void

Parameter:

TypeParameterName
struct xarray *root
struct radix_tree_iter *iter
gfp_tgfp
unsigned longmax
1490  node = NULL
1491  void __rcu * * slot = (void __rcu * * ) & xa_head
1492  start = next_index
1493  offset = 0
1495  grow :
1496  shift = radix_tree_load_root(root, & child, & maxindex)
1497  If Not adix_tree_tagged - test whether any items in the tree are tagged*@root: radix tree root*@tag: tag to test Then start = max(start, maxindex + 1)
1499  If start > max Then Return ERR_PTR( - ENOSPC)
1502  If start > maxindex Then
1503  error = Extend a radix tree so it can store key @index.
1504  If error < 0 Then Return ERR_PTR(error)
1506  shift = error
1507  child = Dependency order vs. p above. (xa_head)
1509  If start == 0 && shift == 0 Then shift = adix-tree API starts here **
1512  When shift cycle
1513  shift -= adix-tree API starts here **
1514  If (child == NULL) Then
1518  If Not child Then Return ERR_PTR( - ENOMEM)
1522  If node Then count++
1524  Else if Not radix_tree_is_internal_node(child) Then Break
1527  node = entry_to_node(child)
1528  offset = radix_tree_descend(node, & child, start)
1533  If start > max || start == 0 Then Return ERR_PTR( - ENOSPC)
1536  offset = offset + 1
1537  node = parent
1538  If Not node Then Go to grow
1540  shift = shift
1544  slot = slots[offset]
1547  index = start
1548  If node Then next_index = 1 + min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(max, (start | node_maxindex(node)))
1550  Else next_index = 1
1552  node = node
1553  Construct iter->tags bit-mask from node->tags[tag] array
1555  Return slot
Caller
NameDescribe
idr_alloc_u32