wq_has_single_sleeper(9)
π wq_has_single_sleeper β a kernel API manual page (section 9) π
okay so bestie, welcome to wq_has_single_sleeper(9), straight out of the Kernel API Manual. this one is smol but mighty, let's get into it π«Ά
β¨ NAME β¨
wq_has_single_sleeper β check if there is only one sleeper π
πΈ SYNOPSIS πΈ
bool wq_has_single_sleeper (struct wait_queue_head *wq_head );
like, that's the whole vibe. one function, one argument, returns a bool. iconic. π
π ARGUMENTS π
wq_headβ the wait queue head π€ literally the thing you're checking on.
π¦ DESCRIPTION π¦
so here's the tea: it returns true if wq_head has only one sleeper on the list. one. single. solitary. sleeper. no cap. π₯
and if you want the full lore, please refer to the comment for waitqueue_active β that's where the backstory lives, iykyk πβ¨
ngl, this is a "go read the other function's comment" situation and honestly? valid.
π SEE ALSO π
Kernel file ./include/linux/wait.h:
waitqueue_active(9)wq_has_sleeper(9)wake_up_pollfree(9)wait_event(9)wait_event_freezable(9)wait_event_timeout(9)wait_event_cmd(9)wait_event_interruptible(9)wait_event_interruptible_timeout(9)wait_event_hrtimeout(9)wait_event_interruptible_hrtimeout(9)wait_event_idle(9)wait_event_idle_exclusive(9)wait_event_idle_timeout(9)wait_event_idle_exclusive_timeout(9)wait_event_interruptible_locked(9)wait_event_interruptible_locked_irq(9)wait_event_interruptible_exclusive_locked(9)wait_event_interruptible_exclusive_locked_irq(9)wait_event_killable(9)wait_event_state(9)wait_event_killable_timeout(9)wait_event_lock_irq_cmd(9)wait_event_lock_irq(9)wait_event_interruptible_lock_irq_cmd(9)wait_event_interruptible_lock_irq(9)wait_event_interruptible_lock_irq_timeout(9)
like, that is a whole friend group of wait_event functions and they all ate ππ
and that's the page!! mwah π this cutie lives in ./include/linux, dated October 2026, and its page name is wq_has_single_sleeper(9). go forth and check your sleepers, 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