Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\find_bit.c Create Date:2022-07-28 06:24:25
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:static inline unsigned long _find_next_bit(const unsigned long *addr1, const unsigned long *addr2, unsigned long nbits, unsigned long start, unsigned long invert)

Type:unsigned long

Parameter:

TypeParameterName
const unsigned long *addr1
const unsigned long *addr2
unsigned longnbits
unsigned longstart
unsigned longinvert
36  If Value for the false possibility is greater at compile time(start >= nbits) Then Return nbits
39  tmp = addr1[start / BITS_PER_LONG]
40  If addr2 Then tmp &= 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  When Not tmp cycle
49  start += BITS_PER_LONG
50  If start >= nbits Then Return nbits
53  tmp = addr1[start / BITS_PER_LONG]
54  If addr2 Then tmp &= addr2[start / BITS_PER_LONG]
56  tmp ^= invert
59  Return min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(start + __ffs - find first set bit in word*@word: The word to search* Undefined if no bit exists, so code should check against 0 first., nbits)
Caller
NameDescribe
find_next_bitFind the next set bit in a memory region.
find_next_zero_bitFind the next zero bit in a memory region.
find_next_and_bit