wq_has_single_sleeper(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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:

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