find_nth_and_bit(9)
π find_nth_and_bit(9) π
okay so you opened the Kernel API Manual, and todayβs main character is find_nth_and_bit β the bit-finding bestie with two memory regions and zero chill. π¦β¨
πΈ NAME πΈ
find_nth_and_bit β find N'th set bit in 2 memory regions
β¨ SYNOPSIS β¨
unsigned long find_nth_and_bit (const unsigned long *addr1 , const
unsigned long *addr2 , unsigned long size , unsigned long n );
π ARGUMENTS π
hereβs the tea on the parameters, bestie:
addr1β The 1st address to start the search at. π«Άaddr2β The 2nd address to start the search at. πsizeβ The maximum number of bits to search. thatβs the limit, periodt.nβ The number of set bit, which position is needed, counting from 0. yes bestie,0is where the counting starts. π
π¦ DESCRIPTION π¦
Returns the bit number of the N'th set bit. If no such, returns >= size.
thatβs it, thatβs the vibe: you ask for the N'th set bit, and if thereβs no such bit, you get a value >= size. no cap. πβ¨
π SEE ALSO π
Kernel file ./include/linux/find.h is the spot, and these besties are all linked:
find_next_bit(9)find_next_and_bit(9)find_next_andnot_bit(9)find_next_or_bit(9)find_next_zero_bit(9)find_first_bit(9)find_nth_bit(9)find_nth_and_andnot_bit(9)find_first_and_bit(9)find_first_andnot_bit(9)find_first_and_and_bit(9)find_first_zero_bit(9)find_last_bit(9)find_next_and_bit_wrap(9)find_next_bit_wrap(9)find_next_clump8(9)for_each_set_bitrange(9)for_each_set_bitrange_from(9)for_each_clear_bitrange(9)for_each_clear_bitrange_from(9)for_each_set_bit_wrap(9)for_each_set_clump8(9)
mwah π β signed off from ./include/linux, dated October 2026. slay, bestie ππ
π¦ 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