for_each_set_clump8(9)
β¨ for_each_set_clump8(9) β¨
okay bestie, welcome to the Kernel API Manual π this one's a macro and it's honestly so iconic β it walks your bitmap in 8-bit clumps and only stops at the clumps that have set bits in them. no cap, it's giving "selective scrolling" energy π
πΈ NAME πΈ
for_each_set_clump8 β iterate over bitmap for each 8-bit clump with set bits π
like, literally: for every 8-bit clump that has any set bits, you get a turn. the ones that are all zeroes? they don't get an invite to the group chat π
π¦ SYNOPSIS π¦
for_each_set_clump8 (start , clump , bits , size );
π ARGUMENTS π
startβ bit offset to start the search from, and also where the current iteration offset gets stored π₯ so it's both the starting point and the lil bookmark that moves along as you go. main character of the argument list ngl.clumpβ the location where a copy of the current 8-bit clump gets stored π that's where you peek at what you found.bitsβ the bitmap address you're basing the search on π your actual data, your vibe.sizeβ the bitmap size, measured in number of bits β¨ not bytes, not clumps, bits. don't get it twisted fr fr.
π SEE ALSO π
Kernel file ./include/linux/find.h is where the fam lives π«Ά and here's the whole squad, no one left behind:
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_bit_wrap(9)
ok that's the whole page bestie, every flag and every reference accounted for, nothing skipped, we ate and left no crumbs πβ¨
and that's a wrap on this little kernel journey π§ coming to you from the source tree at ./include/linux, dated October 2026, in the for_each_set_clump8(9) era β mwah π
π¦ 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