up(9)
β¨ up(9) β¨
okay so bestie, welcome to the up(9) page β Kernel API Manual energy, but make it group chat. this is the semaphore release queen and she's literally so unbothered π
πΈ NAME πΈ
up β release the semaphore π
like, that's it. that's the whole job. release the semaphore.
π¦ SYNOPSIS π¦
void up (struct semaphore *sem );
yes the spacing is exactly like that, don't come for me, copy it verbatim or the compiler will simply know π
π ARGUMENTS π
semβ the semaphore to release. that's your girl. hand her over and let her go π«Ά
π₯ DESCRIPTION π₯
Release the semaphore. periodt.
here's the iconic part though β unlike mutexes, up may be called from any context and even by tasks which have never called down. no cap. you don't have to be the one who locked it, you don't have to be in the same context, you just show up and release it. main character behaviour honestly π
so if you were stressed about "do I have to be the matching down for this" β nope, not a thing here. up is not that kind of semaphore. she's flexible. she's giving versatility β¨
π SEE ALSO π
Kernel file ./kernel/locking/semaphore.c β go read the source, it's right there, iykyk π
that's the whole down-family reunion and honestly they're all worth a read π
mwah π that's the page. go release some semaphores, you're gonna slay.
β from ./kernel/locking, dated October 2026, with love π
π¦ 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