swq_has_sleeper(9)
π swq_has_sleeper(9) π
okay so bestie, welcome to the Kernel API Manual β yes we're reading kernel docs together, this is our bonding time now π«Ά
β¨ NAME β¨
swq_has_sleeper β check if there are any waiting processes π
Like literally, it's the "is anybody home??" of the kernel. No cap.
πΈ SYNOPSIS πΈ
bool swq_has_sleeper (struct swait_queue_head *wq );
that's it, that's the whole vibe. one function, one pointer, returns a bool. simple, iconic, ate π
π ARGUMENTS π
wqβ the waitqueue to test for waiters π§ like, this is the queue you're checking. the one you're side-eyeing. the one you're asking "soβ¦ anyone in there?"
π DESCRIPTION π
Returns true if wq has waiting processes β¨
that's the whole thing. true = somebody's waiting, false = nobody's around, the queue is empty, it's giving ghost town π
real talk tho: please refer to the comment for swait_active π β the docs said it, not me. go read that comment, it's the source of truth, iykyk.
π¦ SEE ALSO π¦
- Kernel file
./include/linux/swait.hπ swait_active(9)swait_event_idle_exclusive(9)swait_event_idle_timeout_exclusive(9)
the whole swait girlies, all linked up, all besties π
and that's the page!! π mwah π
lil sign-off: this one lives in ./include/linux, stamped October 2026, and it's swq_has_sleeper(9) β main character of the swait queue, periodt ππ
π¦ 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