sbitmap_queue_get_shallow(9)
β¨ sbitmap_queue_get_shallow π
okay so this is a page from the Kernel API Manual β yes the kernel has manpages too and they're giving very much "I know things" energy π
πΈ NAME πΈ
sbitmap_queue_get_shallow β bestie, it tries to allocate a free bit from a &struct sbitmap_queue, and it limits the depth used from each word, and you gotta have preemption already disabled when you call it. no cap, that's the whole deal β¨
π¦ SYNOPSIS π¦
int sbitmap_queue_get_shallow (struct sbitmap_queue *sbq , unsigned int
shallow_depth );
π ARGUMENTS π
sbqβ the bitmap queue you're allocating from. that's your girl πshallow_depthβ the max number of bits to allocate from the queue. seesbitmap_get_shallow. slay, it's literally in the name π
π DESCRIPTION π
so if you call this, you gotta call sbitmap_queue_min_shallow_depth after initializing sbq. like, that's not optional, that's the vibe check π₯
fr fr, don't skip the sbitmap_queue_min_shallow_depth call after init. it's giving required. π
π RETURN π
- Non-negative allocated bit number if it worked β iconic, ate, no notes π«Ά
-1otherwise β π that's the "it didn't work" number
β SEE ALSO β
kernel file ./include/linux/sbitmap.h, plus the whole squad:
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_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(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)
π§ sign-off π§
this masterpiece lives in ./include/linux, and it's dated October 2026 β yes, the future, main character energy fr π«
that's the page bestie, go allocate those bits responsibly π β¨π
π¦ 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