sbitmap_for_each_set(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ sbitmap_for_each_set(9) ✨

okay so this is a page from the Kernel API Manual, and today's main character is sbitmap_for_each_set πŸ’…


🌸 NAME 🌸

sbitmap_for_each_set β€” iterate over each set bit in a &struct sbitmap. that's it, that's the whole vibe πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

void sbitmap_for_each_set (struct sbitmap *sb , sb_for_each_fn fn , void
       *data );

πŸ’– ARGUMENTS πŸ’–

  • sb β€” the bitmap bestie is iterating over. this is the one you're walking through πŸšΆβ€β™€οΈ
  • fn β€” the callback. it should return true to keep going, or false to break early and dip out 😭 (iykyk, it's giving "graceful exit")
  • data β€” a pointer that gets passed straight to your callback. hand it whatever you want fr fr 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/linux/sbitmap.h, plus literally the whole sbitmap extended universe 🌈:


and that's the page!! πŸ“ no cap, it's short but it ate. mwah πŸ’‹

so anyway, the source for all this is ./include/linux, dated October 2026, and it's filed under sbitmap_for_each_set(9) β€” stan the kernel docs bestie, they literally never miss ✨🫢

πŸ“¦ where this page comes from