find_next_zero_bit(9)
π find_next_zero_bit(9)
ok so bestie, welcome to the Kernel API Manual β today we're decoding find_next_zero_bit, and honestly? she's an icon. a little bit-finder with main character energy. let's get into it π
β¨ NAME β¨
find_next_zero_bit β find the next cleared bit in a memory region π¦
like, literally, she goes looking for a 0. that's the whole vibe check. no cap.
πΈ SYNOPSIS πΈ
unsigned long find_next_zero_bit (const unsigned long *addr , unsigned long size , unsigned long offset );
three arguments, one unsigned long back. it's giving "simple but powerful", and honestly we stan π
π§ ARGUMENTS π§
addrβ the address to base the search on. this is where the hunt begins, bestie πΊοΈsizeβ the bitmap size in bits. aka how far she's allowed to look before she gives up πoffsetβ the bitnumber to start searching at. so like, the starting line β she doesn't start from zero unless you tell her to β
π DESCRIPTION π
Returns the bit number of the next zero bit π
If no bits are zero, returns size.
that's it. that's the whole thing. she searches, she finds the next cleared bit, she hands you the number, she slays, she leaves π₯ and if literally zero bits are zero (lol, the irony), she just returns size and walks away, unbothered. queen behaviour fr fr π
π SEE ALSO π
Kernel file ./tools/include/linux/find.h plus the whole bestie squad:
find_next_bit(9)find_next_and_bit(9)find_first_bit(9)find_first_and_bit(9)find_first_zero_bit(9)
ok that's the page!! π«Ά she lives in ./tools/include/linux, dated October 2026, and she's filed under find_next_zero_bit(9) β go forth and find those zeroes, bestie, i believe in you ππβ¨
π¦ 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