for_each_set_bit_wrap(9)
π NAME π
okay so bestie, welcome to this page β it's for_each_set_bit_wrap(9) from the Kernel API Manual, and the whole assignment is literally to iterate over all set bits starting from @start, and wrapping around the end of bitmap. it's giving circular-bitmap main character energy, no cap. π
β¨
β¨ SYNOPSIS β¨
the call looks exactly like this, bestie:
for_each_set_bit_wrap (bit , addr , size , start );
π ARGUMENTS π
here's the little squad you're passing in:
bitβ offset for current iteration. that's your current loop spot, bestie.addrβ bitmap address to base the search on.sizeβ bitmap size in number of bits.startβ Starting bit for bitmap traversing, wrapping around the bitmap end.
πΈ SEE ALSO πΈ
Kernel file ./include/linux/find.h is where the whole find-bit friend group hangs out, and you should also go say hi to:
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_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_clump8(9)
source/version: ./include/linux Β· date: October 2026 Β· page: for_each_set_bit_wrap(9) Β· made with π for my bestie, 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