函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:This is a common helper function for find_next_bit, find_next_zero_bit, and* find_next_and_bit. The differences are:* - The "invert" argument, which is XORed with each fetched word before* searching it for one bits.

函数原型:static inline unsigned long _find_next_bit(const unsigned long *addr1, const unsigned long *addr2, unsigned long nbits, unsigned long start, unsigned long invert)

返回类型:unsigned long

参数:

类型参数名称
const unsigned long *addr1
const unsigned long *addr2
unsigned longnbits
unsigned longstart
unsigned longinvert
36  如果此条件成立可能性小(为编译器优化)(start >= nbits)则返回:nbits
39  tmp等于addr1[start / BITS_PER_LONG]
40  如果addr2tmp与等于addr2[start / BITS_PER_LONG]
42  tmp异或等于invert
45  tmp与等于BITMAP_FIRST_WORD_MASK(start)
46  start等于und_down - round down to next specified power of 2*@x: the value to round*@y: multiple to round down to (must be a power of 2)* Rounds @x down to next multiple of @y (which must be a power of 2).* To perform arbitrary rounding down, use rounddown() below.(start, BITS_PER_LONG)
48  当非tmp循环
49  start加等于BITS_PER_LONG
50  如果start大于等于nbits则返回:nbits
53  tmp等于addr1[start / BITS_PER_LONG]
54  如果addr2tmp与等于addr2[start / BITS_PER_LONG]
56  tmp异或等于invert
59  返回:两数取小(start + 在字中找到第一个指定位, nbits)
调用者
名称描述
find_next_bit在内存区域中找到下一个设置位
find_next_zero_bit在内存区域中查找下一个零位
find_next_and_bit