函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:sbitmap_get_shallow

函数原型:int sbitmap_get_shallow(struct sbitmap *sb, unsigned int alloc_hint, unsigned long shallow_depth)

返回类型:int

参数:

类型参数名称
struct sbitmap *sb
unsigned intalloc_hint
unsigned longshallow_depth
196  nr等于负1
198  index等于SB_NR_TO_INDEX(sb, alloc_hint)
200 i小于@map_nr: Number of words (cachelines) being used for the bitmap.循环
201  again :
202  nr等于__sbitmap_get_word( & @word: word holding free bits, 两数取小(@depth: Number of bits being used in @word/@cleared, shallow_depth), SB_NR_TO_BIT(sb, alloc_hint), true)
205  如果nr不等于负1则
207  退出
210  如果See if we have deferred clears that we can batch move则转到:again
214  index自加
215  alloc_hint等于index左移@shift: log2(number of bits used per word)
218  index等于0
219  alloc_hint等于0
223  返回:nr
调用者
名称描述
__sbitmap_queue_get_shallow