sbitmap_weight(9)
π NAME π
okay so bestie, this is sbitmap_weight(9) from the Kernel API Manual, and it is lowkey iconic for being exactly what it says π«Ά. It returns how many set and not cleared bits are living in a &struct sbitmap β no cap, just the count, and it's giving tiny-but-mighty main character energy β¨.
πΈ SYNOPSIS πΈ
the whole signature is literally:
unsigned int sbitmap_weight (const struct sbitmap *sb );
π ARGUMENTS π
sbβ Bitmap to check. That's the one job, and it ate π .
π¦ RETURN π¦
How many set and not cleared bits set β yes, that's the number coming back at you, bestie. The count of set-and-not-cleared bits, periodt π₯.
π SEE ALSO π
Kernel file ./include/linux/sbitmap.h, plus the whole friend group β iykyk π:
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_for_each_set(9)sbitmap_show(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)
source/version: ./include/linux Β· date: October 2026 β signed, sealed, slayed π
sbitmap_weight(9) out, bestie ππ
π¦ 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