closure_sync(9)
π€ closure_sync(9) β the kernel API manual, bestie edition
okay so this is closure_sync from the kernel API manual and honestly? it's a whole mood. it's the "imma just nap until everyone else is done" function, and the way it works is kind of iconic actually.
β¨ NAME β¨
closure_sync β sleep until a closure a closure has nothing left to wait on
not me noticing the double "a closure" in the official name line π it's in the original, i'm not touching it, we respect the source material in this house π
πΈ SYNOPSIS πΈ
void closure_sync (struct closure *cl );
π ARGUMENTS π
clβ-- undescribed --
no fr like... the docs literally just say undescribed. that's it. that's the whole entry. she's mysterious, she's enigmatic, she's giving "we'll find out together" energy π«Ά (it's a struct closure *, that part at least is right there in the synopsis, iykyk)
π¦ DESCRIPTION π¦
okay so picture this: closure_sync sleeps until the refcount hits 1. why 1 and not 0, you ask? because the thread that's running the closure owns that last refcount, babe. that one is hers. the last ref is the main character and everyone else has already dropped theirs and left the group chat π
so she just vibes there, sleeping, until literally every other reference is gone and she's the only one holding on. periodt.
π SEE ALSO π
the whole closure friend group, fr fr:
- the kernel file
./include/linux/closure.h closure_get(9)closure_get_not_zero(9)closure_init(9)closure_wake_up(9)continue_at(9)closure_return(9)continue_at_nobarrier(9)closure_return_with_destructor(9)closure_call(9)
that's the whole page bestie, short and sweet, no filler, exactly like the original π
πΈ written from ./include/linux, dated October 2026 β mwah, sending you a kiss, go read the other closure pages, ily, bye πβ¨
π¦ 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