wait_event_killable_timeout(9)
π NAME π
Okay bestie, welcome to the Kernel API Manual page for wait_event_killable_timeout(9) β folded in right at the top so we can get straight to the function. The whole entire job is: wait_event_killable_timeout β sleep until a condition gets true or a timeout elapses. Slay.
β¨ SYNOPSIS β¨
wait_event_killable_timeout (wq_head , condition , timeout );
π ARGUMENTS π
wq_headβ the waitqueue to wait on. That's your wait spot, bestie.conditionβ a C expression for the event to wait for. This is the thing you're literally waiting on to get true.timeoutβ timeout, in jiffies. Yep, jiffies, not seconds β don't come for me.
π¦ DESCRIPTION π¦
Okay so here's the vibe check: the process is put to sleep (TASK_KILLABLE) until the condition evaluates to true or a kill signal is received. The condition is checked each time the waitqueue wq_head is woken up.
wake_up has to be called after changing any variable that could change the result of the wait condition. That's a hard requirement, bestie β wake_up has to be called, periodt.
Only kill signals interrupt this process. Only kill signals β that's the whole guest list.
π₯ RETURN π₯
0if the condition evaluated tofalseafter the timeout elapsed.1if the condition evaluated totrueafter the timeout elapsed.- the remaining jiffies (at least
1) if the condition evaluated totruebefore the timeout elapsed. -ERESTARTSYSif it was interrupted by a kill signal.
π SEE ALSO π
Kernel file ./include/linux/wait.h is in the SEE ALSO squad, and the rest of the references are:
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_killable(9)wait_event_state(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)
Mwah π β source/version: ./include/linux; date: October 2026; page: wait_event_killable_timeout(9) π
π¦ 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