函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\vsprintf.c Create Date:2022-07-27 07:09:26
Last Modify:2022-05-21 09:47:42 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:bitmap_string

函数原型:static __attribute__((__noinline__)) char *bitmap_string(char *buf, char *end, unsigned long *bitmap, struct printf_spec spec, const char *fmt)

返回类型:char

参数:

类型参数名称
char *buf
char *end
unsigned long *bitmap
struct printf_specspec
const char *fmt
1157  CHUNKSZ等于32
1158  nr_bits等于max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(int, width of output field , 0)
1160  bool first = true
1162  如果check_pointer( & buf, end, bitmap, spec)则返回:buf
1166  spec = (struct printf_spec){ flags to number() = use lowercase in hex (must be 32 == 0x20) | pad with zero, must be 16 == '0' - ' ' , number base, 8, 10 or 16 only = 16}
1168  chunksz等于nr_bits按位与CHUNKSZ减1
1169  如果chunksz恒等于0则chunksz等于CHUNKSZ
1172  i等于@a is a power of 2 value (nr_bits, CHUNKSZ)减CHUNKSZ
1173 i大于等于0循环
1177  chunkmask等于1ULL左移chunksz位的值减1
1178  word等于iBITS_PER_LONG
1179  bit等于i取模BITS_PER_LONG
1180  val等于bitmap[word]右移bit位按位与chunkmask
1182  如果非first
1183  如果buf小于endbuf等于','
1185  buf自加
1187  first = false
1189  width of output field 等于DIV_ROUND_UP(chunksz, 4)
1190  buf等于number(buf, end, val, spec)
1192  chunksz等于CHUNKSZ
1194  返回:buf
调用者
名称描述
pointerShow a '%p' thing. A kernel extension is that the '%p' is followed* by an extra set of alphanumeric characters that are extended format* specifiers.* Please update scripts/checkpatch.pl when adding/removing conversion* characters