completion_done(9)
π completion_done(9) β the kernel API manual, but make it make sense
okay so bestie, welcome to completion_done from the Kernel API Manual β yes that's the manual name, yes it's giving "ancient scrolls," but stay with me because this one is actually so useful π«Ά
β¨ NAME β¨
completion_done β a lil vibe check to see if a completion has any waiters π
πΈ SYNOPSIS πΈ
bool completion_done (struct completion *x );
that's it. that's the whole thing. one arg, one bool back. iconic behavior honestly β¨
π ARGUMENTS π
xβ the completion structure bestie, that's it, that's the arg π
π¦ RETURN π¦
0β there ARE waiters (like,wait_for_completionis in progress rn) π1β there are NO waiters, nobody's waiting, the group chat is quiet π
ok so heads up, the0-means-waiters thing is lowkey the reverse of what your brain wants.0= people waiting.1= nobody waiting. not me almost getting this backwards π
π DESCRIPTION π
so here's the tea π: this will always return true if complete_all was called on X.
that's literally the whole note. read it again. complete_all on X? always true. no cap. π
π SEE ALSO π
Kernel file ./kernel/sched/completion.c β go read it, it's right there:
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_interruptible_timeout(9)wait_for_completion_killable(9)wait_for_completion_killable_timeout(9)try_wait_for_completion(9)
like a whole friend group of completion functions honestly, they all ate π₯
and that's the page!! brought to you by ./kernel/sched, dated October 2026 β mwah, go touch some completions bestie ππ§
π¦ 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