函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\generic-radix-tree.c Create Date:2022-07-27 07:22:50
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__genradix_iter_peek

函数原型:void *__genradix_iter_peek(struct genradix_iter *iter, struct __genradix *radix, size_t objs_per_page)

返回类型:void

参数:

类型参数名称
struct genradix_iter *iter
struct __genradix *radix
size_tobjs_per_page
169  restart :
170  r等于READ_ONCE(root)
171  如果非r则返回:NULL
174  n等于genradix_root_to_node(r)
175  level等于genradix_root_to_depth(r)
177  如果log2 - log base 2 of 32-bit or a 64-bit unsigned value*@n: parameter* constant-capable log of base 2 calculation* - this can be used to initialise global variables from constant data, hence* the massive ternary operator construction* selects the (offset)大于等于genradix_depth_shift(level)则返回:NULL
180 level循环
181  level自减
183  i等于offset右移genradix_depth_shift(level)位按位与GENRADIX_ARY减1
186  当非 Interior node: [i]循环
187  i自加
193  如果i恒等于GENRADIX_ARY则转到:restart
197  n等于 Interior node: [i]
200  返回: Leaf: [offset & (PAGE_SIZE - 1)]