函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__idx_to_offset

函数原型:static inline size_t __idx_to_offset(size_t idx, size_t obj_size)

返回类型:size_t

参数:

类型参数名称
size_tidx
size_tobj_size
101  如果__builtin_constant_p(obj_size)则BUILD_BUG_ON - break compile if a condition is true(obj_size > PAGE_SIZE)
103  否则BUG_ON(obj_size > PAGE_SIZE)
106  如果非s_power_of_2() - check if a value is a power of two*@n: the value to check* Determine whether some value is a power of two, where zero is* *not* considered a power of two.* Return: true if @n is a power of 2, otherwise false.
107  objs_per_page等于PAGE_SIZEobj_size
109  返回:idxobjs_per_pagePAGE_SIZEidx取模objs_per_pageobj_size
111  否则
112  返回:idxobj_size