wait_event_killable(9)
π€ wait_event_killable(9) π€
okay bestie, welcome to the Kernel API Manual entry for wait_event_killable(9) β this one is lowkey iconic and very βsleep until the vibe changesβ π
β¨ NAME β¨
wait_event_killable β sleep until a condition gets true. fr fr, thatβs the whole name vibe π«Ά
π€ SYNOPSIS π€
okay so hereβs the exact shape of it, no cap:
wait_event_killable (wq_head , condition );
π ARGUMENTS π
wq_headβ the waitqueue to wait on. thatβs the spot youβre chilling at ποΈconditionβ a C expression for the event to wait for. the thing your whole personality is waiting on β¨
π¦ DESCRIPTION π¦
The process is put to sleep (TASK_KILLABLE) until the condition evaluates to true or a signal is received. Periodt. Every single time the waitqueue wq_head is woken up, the condition gets checked again π
wake_up has to be called after changing any variable that could change the result of the wait condition. not me reminding you again, but likeβ¦ yes, you actually have to do it π
β οΈ reminder bestie: wake_up has to be called after changing any variable that could change the result of the wait condition. do not skip this step, iβm begging π
The function will return -ERESTARTSYS if it was interrupted by a signal and 0 if condition evaluated to true. thatβs the whole return vibe π
π SEE ALSO π
Kernel file ./include/linux/wait.h plus the entire squad: waitqueue_active(9), wq_has_single_sleeper(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_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) π«Άβ¨
xoxo bestie, from the ./include/linux source, version wait_event_killable(9), dated October 2026 β this page is signing off π
ππ¦
π¦ 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