wait_for_completion_timeout(9)
π wait_for_completion_timeout(9) π
okay so bestie, welcome to the Kernel API Manual β yes this is the wait_for_completion_timeout(9) page and no I will not be normal about it β¨
π NAME π
wait_for_completion_timeout β waits for completion of a task (w/timeout), like literally just sits there and waits but with a clock ticking, main character energy fr fr
πΈ SYNOPSIS πΈ
unsigned long wait_for_completion_timeout (struct completion *x ,
unsigned long timeout );
π¦ ARGUMENTS π¦
xβ holds the state of this particular completion. that's it, that's the whole thing, it's the vibe holder for this completion specifically πtimeoutβ the timeout value, and it's in jiffies (iykyk). not seconds, not millis, jiffies. periodt.
β¨ DESCRIPTION β¨
So what does it actually do? It waits for either a completion of a specific task to be signaled or for a specified timeout to expire β whichever hits first, bestie. it's giving "race between a notification and a clock" and honestly? iconic. π
The timeout is in jiffies, keep that in your notes.
β οΈ It is not interruptible. like, at all. no signals are gonna save you here, it's committed to the wait π
π RETURN π
0β you timed out, rip π«- positive β completed! and it's at least
1, or the number of jiffies left till timeout π₯
π SEE ALSO π
Kernel file ./kernel/sched/completion.c
complete(9)complete_all(9)wait_for_completion(9)wait_for_completion_io(9)wait_for_completion_io_timeout(9)wait_for_completion_interruptible(9)wait_for_completion_interruptible_timeout(9)wait_for_completion_killable(9)wait_for_completion_killable_timeout(9)try_wait_for_completion(9)completion_done(9)
okay that's the whole page, go forth and wait responsibly π§π
β mwah, this page lives in ./kernel/sched, dated October 2026, and yes it's still out here answering to the name wait_for_completion_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