Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:adix_tree_next_chunk - find next chunk of slots for iteration*@root: radix tree root*@iter: iterator state*@flags: RADIX_TREE_ITER_* flags and tag index* Returns: pointer to chunk first slot, or NULL if iteration is over

Proto:void __rcu **radix_tree_next_chunk(const struct xarray *root, struct radix_tree_iter *iter, unsigned flags)

Type:void

Parameter:

TypeParameterName
const struct xarray *root
struct radix_tree_iter *iter
unsignedflags
1167  tag = flags & RADIX_TREE_ITER_TAG_MASK
1171  If flags & RADIX_TREE_ITER_TAGGED && Not root_tag_get(root, tag) Then Return NULL
1183  index = next_index
1184  If Not index && index Then Return NULL
1187  restart :
1188  radix_tree_load_root(root, & child, & maxindex)
1189  If index > maxindex Then Return NULL
1191  If Not child Then Return NULL
1194  If Not radix_tree_is_internal_node(child) Then
1196  index = index
1197  next_index = maxindex + 1
1198  tags = 1
1199  node = NULL
1200  Return (void __rcu * * ) & xa_head
1203  Do
1204  node = entry_to_node(child)
1205  offset = radix_tree_descend(node, & child, index)
1207  If If flags & RADIX_TREE_ITER_TAGGED Then Not tag_get(node, tag, offset) Else Not child Then
1210  If flags & RADIX_TREE_ITER_CONTIG Then Return NULL
1216  Else When ++offset < RADIX_TREE_MAP_SIZE cycle
1220  If slot Then Break
1223  index &= ~node_maxindex(node)
1224  index += offset << shift
1226  If Not index Then Return NULL
1228  If offset == RADIX_TREE_MAP_SIZE Then Go to restart
1230  child = Dependency order vs. p above. (slots[offset])
1233  If Not child Then Go to restart
1235  If child == RADIX_TREE_RETRY Then Break
1237  When shift && radix_tree_is_internal_node(child) cycle
1240  index = index & ~node_maxindex(node) | offset
1241  next_index = (index | node_maxindex(node)) + 1
1242  node = node
1244  If flags & RADIX_TREE_ITER_TAGGED Then Construct iter->tags bit-mask from node->tags[tag] array
1247  Return slots + offset
Caller
NameDescribe
radix_tree_iter_lookupadix_tree_iter_lookup - look up an index in the radix tree*@root: radix tree root*@iter: iterator state*@index: key to look up* If @index is present in the radix tree, this function returns the slot* containing it and updates @iter to describe the entry