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:35
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Returns pointer to the specified byte @offset within @radix, or NULL if not* allocated

Proto:void *__genradix_ptr(struct __genradix *radix, size_t offset)

Type:void

Parameter:

TypeParameterName
struct __genradix *radix
size_toffset
56  r = READ_ONCE(root)
57  n = genradix_root_to_node(r)
58  level = genradix_root_to_depth(r)
60  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
63  When 1 cycle
64  If Not n Then Return NULL
66  If Not level Then Break
69  level--
71  n = Interior node: [offset >> genradix_depth_shift(level)]
72  offset &= Returns size (of data, in bytes) that a tree of a given depth holds: - 1
75  Return Leaf: [offset]