函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__sbitmap_get_word

函数原型:static int __sbitmap_get_word(unsigned long *word, unsigned long depth, unsigned int hint, bool wrap)

返回类型:int

参数:

类型参数名称
unsigned long *word
unsigned longdepth
unsigned inthint
boolwrap
110  orig_hint等于hint
113  当1循环
114  nr等于在内存区域中查找下一个零位
121  如果orig_hinthintwrap
122  hint等于orig_hint等于0
123  继续下一循环
125  返回:负1
128  如果非st_and_set_bit_lock - Set a bit and return its old value, for lock*@nr: Bit to set*@addr: Address to count from* This operation is atomic and provides acquire barrier semantics if* the returned value is 0.* It can be used to implement bit locks.退出
131  hint等于nr加1
132  如果hint大于等于depth减1则hint等于0
136  返回:nr
调用者
名称描述
sbitmap_find_bit_in_index
sbitmap_get_shallow