wait_for_com...ion_killable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… wait_for_completion_killable πŸ’…

okay so bestie, welcome to the Kernel API Manual ✨ this one's a lil cutie from the kernel scheduler girlies β€” it's literally called wait_for_completion_killable, and yes the header up top gets truncated to wait_for_com...ion_killable(9) like a text message that ran out of characters 😭 but we know her full name, she's iconic.


🌸 NAME 🌸

wait_for_completion_killable β€” waits for completion of a task (killable) 🫢


✨ SYNOPSIS ✨

int wait_for_completion_killable (struct completion *x );

that's it, that's the whole vibe check πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • x β€” holds the state of this particular completion. she's the main character of this call, no cap πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, this function waits to be signaled for completion of a specific task. that's the whole job, she waits 🧚

and here's the slay part: it can be interrupted by a kill signal πŸ”₯ so if something goes "actually no, we're done here," she respectfully dips. not me being interruptible, couldn't be her ✨


πŸ’– RETURN πŸ’–

  • -ERESTARTSYS if interrupted πŸ›‘
  • 0 if completed βœ…

two outcomes, both valid, periodt πŸ’…


🌈 SEE ALSO 🌈

all the sisters live in the kernel file ./kernel/sched/completion.c β€” go say hi 🫢

like a whole friend group honestly, iykyk πŸ’œ


lowkey a reminder that -ERESTARTSYS means a kill signal showed up and interrupted the wait β€” so handle that return value, bestie, don't just ignore her πŸ™ˆ

okay that's the page!! sourced from ./kernel/sched, dated October 2026, and it's the wait_for_completion_killable(9) girl herself β€” ily, go wait on something killable πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from