sbitmap_queue_get_shallow(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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. see sbitmap_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 🫢
  • -1 otherwise β€” 😭 that's the "it didn't work" number

⭐ SEE ALSO ⭐

kernel file ./include/linux/sbitmap.h, plus the whole squad:


🧚 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