find_next_bit_wrap(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… find_next_bit_wrap β€” find the next set bit in a memory region

okay bestie, this one's a little kernel function from the Kernel API Manual and honestly? she's giving "wrap around the bitmap and find me a vibe" ✨ like she searches a memory region for the next set bit, and if there's nothing ahead of you, she loops back around to the front. iconic behavior honestly πŸŽ€


✨ SYNOPSIS ✨

unsigned long find_next_bit_wrap (const unsigned long *addr , unsigned long size , unsigned long offset );

like yes that's the whole signature, she's not complicated πŸ’…


🌸 ARGUMENTS 🌸

  • addr β€” the address you're basing the search on 🫢 like, where the memory region lives, that's her home base
  • size β€” the bitmap size in bits (bits!! not bytes!! don't come for me) πŸ“
  • offset β€” the bitnumber you start searching at 🏁 like, "begin the hunt here bestie"

πŸ’– DESCRIPTION πŸ’–

so here's the tea β˜•: she returns the bit number for the next set bit, or the first set bit up to offset β€” that's the wrap part, she goes around πŸ” and if literally no bits are set? she returns size. that's it, that's the whole mood. no bits, no problem, you get size back 😌

lowkey the "wrap" in the name is doing a lot of work here β€” she checks forward from offset, then loops back to the start of the region. bestie's got range πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./include/linux/find.h β€” that's where the whole friend group lives 🏑✨

like that's the entire group chat and they're all invited to the function πŸ’œ no cap, go read them all.


and that's the whole page babes 🌈 this queen ships out of ./include/linux and she's dated October 2026 β€” yeah, from the future, main character energy fr fr πŸ‘‘πŸ’… mwah, go find some bits πŸ“

πŸ“¦ where this page comes from