find_first_bit(9)
π find_first_bit
okay so bestie, welcome to the Kernel API Manual β¨ β yes you're literally reading kernel API docs now, main character energy fr fr π
πΈ NAME πΈ
find_first_bit β find the first set bit in a memory region π
β¨ SYNOPSIS β¨
unsigned long find_first_bit (const unsigned long *addr , unsigned long
size );
that's the whole signature, no cap π«Ά
π§ ARGUMENTS π§
addrβ The address to start the search at π like, where the hunt beginssizeβ The maximum number of bits to search π the search budget, basically
π DESCRIPTION π
Returns the bit number of the first set bit. β
And if no bits are set? it just returns size. yep, that's it, that's the whole vibe check π no drama, no -1, just size. iconic behavior honestly.
π¦ SEE ALSO π¦
Kernel file ./tools/include/linux/find.h π
find_next_bit(9)find_next_and_bit(9)find_next_zero_bit(9)find_first_and_bit(9)find_first_zero_bit(9)
all the bit-finding besties, go read them too π
ngl bestie, this one's short and sweet β but the details are the details, so memorize them ππ
β¨ k bye, this page was brought to you by ./tools/include/linux, dated October 2026, and it's literally named find_first_bit(9) β slay, go find those bits β¨ ππ§ββοΈππΈπ«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms