函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__sbitmap_for_each_set() - Iterate over each set bit in a &struct sbitmap

函数原型:static inline void __sbitmap_for_each_set(struct sbitmap *sb, unsigned int start, sb_for_each_fn fn, void *data)

返回类型:void

参数:

类型参数名称
struct sbitmap *sb
unsigned intstart
sb_for_each_fnfn
void *data
240  scanned等于0
242  如果start大于等于@depth: Number of bits used in the whole bitmap.start等于0
244  index等于SB_NR_TO_INDEX(sb, start)
245  nr等于SB_NR_TO_BIT(sb, start)
247 scanned小于@depth: Number of bits used in the whole bitmap.循环
249  depth等于min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(unsignedint, @depth: Number of bits being used in @word/@cleared - nr, @depth: Number of bits used in the whole bitmap. - scanned)
253  scanned加等于depth
254  word等于@word: word holding free bits按位与@cleared: word holding cleared bits的反
255  如果非word则转到:next
263  depth加等于nr
264  当1循环
266  如果nr大于等于depth退出
268  如果非fn(sb, (index << @shift: log2(number of bits used per word)) + nr, data)则返回
271  nr自加
273  :
274  nr等于0
275  如果index先自加大于等于@map_nr: Number of words (cachelines) being used for the bitmap.index等于0
调用者
名称描述
blk_mq_dequeue_from_ctx
sbitmap_for_each_setsbitmap_for_each_set() - Iterate over each set bit in a &struct sbitmap.*@sb: Bitmap to iterate over.*@fn: Callback. Should return true to continue or false to break early.*@data: Pointer to pass to callback.