Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\generic-radix-tree.c Create Date:2022-07-28 06:25:37
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__genradix_iter_peek

Proto:void *__genradix_iter_peek(struct genradix_iter *iter, struct __genradix *radix, size_t objs_per_page)

Type:void

Parameter:

TypeParameterName
struct genradix_iter *iter
struct __genradix *radix
size_tobjs_per_page
169  restart :
170  r = READ_ONCE(root)
171  If Not r Then Return NULL
174  n = genradix_root_to_node(r)
175  level = genradix_root_to_depth(r)
177  If 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) Then Return NULL
180  When level cycle
181  level--
183  i = offset >> genradix_depth_shift(level) & GENRADIX_ARY - 1
186  When Not Interior node: [i] cycle
187  i++
193  If i == GENRADIX_ARY Then Go to restart
197  n = Interior node: [i]
200  Return Leaf: [offset & (PAGE_SIZE - 1)]