函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\radix-tree.c Create Date:2022-07-27 07:10:24
Last Modify:2022-05-21 10:04:37 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:在radix树中找到下一个块的迭代

函数原型:void __rcu **radix_tree_next_chunk(const struct xarray *root, struct radix_tree_iter *iter, unsigned flags)

返回类型:void

参数:

类型参数名称
const struct xarray *root
struct radix_tree_iter *iter
unsignedflags
1167  tag等于flags按位与RADIX_TREE_ITER_TAG_MASK
1171  如果flags按位与RADIX_TREE_ITER_TAGGED且非root_tag_get(root, tag)则返回:NULL
1183  index等于next_index
1184  如果非indexindex则返回:NULL
1187  restart :
1188  radix_tree_load_root(root, & child, & maxindex)
1189  如果index大于maxindex则返回:NULL
1191  如果非child则返回:NULL
1194  如果非radix_tree_is_internal_node(child)则
1196  index等于index
1197  next_index等于maxindex加1
1198  tags等于1
1199  node = NULL
1200  返回:(void __rcu * * ) & xa_head
1203  循环
1204  node等于entry_to_node(child)
1205  offset等于radix_tree_descend(node, & child, index)
1207  如果如果flags按位与RADIX_TREE_ITER_TAGGED则非tag_get(node, tag, offset)否则非child
1210  如果flags按位与RADIX_TREE_ITER_CONTIG则返回:NULL
1216  否则当offset先自加小于RADIX_TREE_MAP_SIZE循环
1220  如果slot退出
1223  index与等于node_maxindex(node)的反
1224  index加等于offset左移shift
1226  如果非index则返回:NULL
1228  如果offset恒等于RADIX_TREE_MAP_SIZE则转到:restart
1230  child等于Dependency order vs. p above. (slots[offset])
1233  如果非child则转到:restart
1235  如果child恒等于RADIX_TREE_RETRY退出
1237 shiftradix_tree_is_internal_node(child)循环
1240  index等于index按位与node_maxindex(node)的反按位或offset
1241  next_index等于index按位或node_maxindex(node)的值加1
1242  node等于node
1244  如果flags按位与RADIX_TREE_ITER_TAGGEDConstruct iter->tags bit-mask from node->tags[tag] array
1247  返回:slotsoffset
调用者
名称描述
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