__sbitmap_for_each_set(9)
Okay bestie, welcome to the __sbitmap_for_each_set(9) page from the Kernel API Manual. We're gonna get through this together, and honestly? It's giving iconic. π
β¨
β¨ NAME β¨
__sbitmap_for_each_set β iterate over each set bit in a &struct sbitmap. That's the whole vibe. Periodt. π
π¦ SYNOPSIS π¦
void __sbitmap_for_each_set (struct sbitmap *sb , unsigned int start ,
sb_for_each_fn fn , void *data );
π ARGUMENTS π
sbβ the bitmap you're iterating over. It's the main character of this whole operation. πstartβ where you wanna start the iteration. Like, where the vibe check begins. β¨fnβ the callback, bestie. It should returntrueto continue, orfalseto break early. So if it returnsfalse, you're out. No cap. πββοΈπ¨dataβ a pointer that gets passed to the callback. It's the little care package you hand off. π§
πΈ DESCRIPTION πΈ
Okay so here's the tea: this function is inline even though it's non-trivial. Why? So that the function calls to the callback will hopefully get optimized away. It's giving "performance queen" and we stan. ππ₯
π₯ SEE ALSO π₯
Kernel file: ./include/linux/sbitmap.h
struct sbitmap_word(9)struct sbitmap(9)struct sbq_wait_state(9)struct sbitmap_queue(9)sbitmap_init_node(9)sbitmap_free(9)sbitmap_resize(9)sbitmap_get(9)sbitmap_any_bit_set(9)sbitmap_for_each_set(9)sbitmap_show(9)sbitmap_weight(9)sbitmap_bitmap_show(9)sbitmap_queue_init_node(9)sbitmap_queue_free(9)sbitmap_queue_recalculate_wake_batch(9)sbitmap_queue_resize(9)__sbitmap_queue_get(9)__sbitmap_queue_get_batch(9)sbitmap_queue_get_shallow(9)sbitmap_queue_get(9)sbitmap_queue_min_shallow_depth(9)sbitmap_queue_clear(9)sbitmap_queue_clear_batch(9)sbq_wait_ptr(9)sbitmap_queue_wake_all(9)sbitmap_queue_wake_up(9)sbitmap_queue_show(9)
And that's the whole page, bestie! This one's brought to you by ./include/linux, dated October 2026. Stay slay, and remember: every set bit deserves to be iterated over. πβ¨π«Ά
π¦ 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