find_next_and_bit_wrap(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… find_next_and_bit_wrap β€” kernel API manual, bestie edition

okay so this page is literally about find_next_and_bit_wrap(9) from the Kernel API Manual, and it's giving "bitmap bestie finds your bit" energy, so let's get into it πŸŽ€


✨ NAME ✨

find_next_and_bit_wrap β€” bestie, it finds the next set bit in both memory regions 🫢 no cap, both of them, at the same time.


🌸 SYNOPSIS 🌸

unsigned long find_next_and_bit_wrap (const unsigned long *addr1 , const
unsigned long *addr2 , unsigned long size , unsigned long offset );

copy it exactly like that, character for character, don't be weird about the spacing 😭


πŸ¦‹ ARGUMENTS πŸ¦‹

  • addr1 β€” the first address we're basing the search on. that's her, main character address #1 πŸ‘‘
  • addr2 β€” the second address to base the search on. address #2, equally iconic, we stan a duo πŸ’œ
  • size β€” the bitmap size, in bits. so like, how many bits we're working with 🧚
  • offset β€” the bitnumber to start searching at. your starting point, your launchpad, your vibe check origin ✨

πŸ”₯ DESCRIPTION πŸ”₯

So what does it actually do? It returns the bit number for the next set bit, or the first set bit up to offset. And if no bits are set at all? It returns size. periodt πŸ’…

fr fr, read that again: no bits set β†’ return value is size. that's the whole deal, don't overthink it πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./include/linux/find.h, plus the whole friend group β€” this list is long and we're listing all of them because everyone deserves their moment:


and that's the page, bestie πŸ“ this icon lives in ./include/linux, dated October 2026, and it's filed under the Kernel API Manual β€” go off, you now understand find_next_and_bit_wrap(9) πŸ’–βœ¨

πŸ“¦ where this page comes from