wait_for_co...ible_timeout(9)
π NAME π
okay so bestie, welcome to wait_for_completion_interruptible_timeout β manual section 9, Kernel API Manual, the whole vibe. she waits for completion (w/(to,intr)), and yes that abbreviation is literally just her being extra. π
β¨ SYNOPSIS β¨
long wait_for_completion_interruptible_timeout (struct completion *x ,
unsigned long timeout );
like, that's the whole signature. two args, one long coming back at you. π
π«Ά ARGUMENTS π«Ά
xβ holds the state of this particular completion. she's the main character, she keeps the receipts. πtimeoutβ timeout value in jiffies. yes, jiffies. not seconds, not ms, jiffies. iykyk. β³
πΈ DESCRIPTION πΈ
so what she does is: she waits for either a completion of a specific task to be signaled, or for a specified timeout to expire. whichever comes first, she's out. it's giving "i'll wait but not forever" energy. π
and the key thing β she is interruptible. so if a signal shows up, she's not gonna just stand there. she dips. π¦
the timeout is in jiffies. fr fr, jiffies. don't @ me with milliseconds. π
β RETURN β
here's the vibe check on what she hands back, and there are exactly three moods:
-ERESTARTSYSβ if interrupted. someone signaled, she's out. π0β if timed out. she waited the whole time and nothing happened. π- positive β if completed! at least
1, or the number of jiffies left till timeout. so like, a positive number means we ate. π₯
ngl, the positive return being "jiffies left till timeout" is such a cute little bonus detail, don't sleep on it. β¨
π§ SEE ALSO π§
kernel file ./kernel/sched/completion.c β that's where the magic lives, bestie:
complete(9)complete_all(9)wait_for_completion(9)wait_for_completion_timeout(9)wait_for_completion_io(9)wait_for_completion_io_timeout(9)wait_for_completion_interruptible(9)wait_for_completion_killable(9)wait_for_completion_killable_timeout(9)try_wait_for_completion(9)completion_done(9)
like she has a whole friend group and every single one of them is iconic in her own way. go say hi. π«ΆπΈ
and that's the page, pookies β brought to you from ./kernel/sched, dated October 2026, and filed under wait_for_co...ible_timeout(9) because even the header got truncated and honestly? relatable. πππ¦
π¦ 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