wait_for_completion_timeout(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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


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