find_first_and_bit(9)
π find_first_and_bit(9) π
okay bestie, welcome to the Kernel API Manual page for find_first_and_bit(9) β yes, the manual name is literally right there, folded in like a cute lil intro. This function is lowkey iconic: itβs here to find the first set bit in both memory regions. No cap. β¨
β¨ NAME β¨
find_first_and_bit β find the first set bit in both memory regions. Itβs giving βsearch both regionsβ energy, and honestly? Obsessed. π¦
πΈ SYNOPSIS πΈ
unsigned long find_first_and_bit (const unsigned long *addr1 , const unsigned long *addr2 , unsigned long size );
π ARGUMENTS π
addr1β the first address to base the search on. Like, the first spot youβre checking, bestie. πaddr2β the second address to base the search on. The other spot in the duo. πsizeβ the bitmap size in bits. Thatβs how many bits are in the bitmap, periodt. π₯
π₯ DESCRIPTION π₯
It returns the bit number for the next set bit. If no bits are set, it returns size. Thatβs it β no extra plot twists, no secret side quests. π
okay so if you were hoping for a dramatic ending where it returns something else when nothing is set: nope, it returns size. Thatβs the rule, and it ate. π
π¦ SEE ALSO π¦
The kernel file is ./tools/include/linux/find.h β thatβs where the related lore lives. The whole friend group:
find_next_bit(9)find_next_and_bit(9)find_next_zero_bit(9)find_first_bit(9)find_first_zero_bit(9)
xoxo, your Kernel API Manual bestie π β sourced from ./tools/include/linux, dated October 2026, and this page is find_first_and_bit(9). periodt. π«Ά
π¦ 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