up(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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