down(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… down(9) β€” like, the semaphore acquisition page, bestie

okay so real talk, this is down from the Kernel API Manual, and it's one of those pages you need to know about even if you're not gonna use it (spoiler: you're not, it's deprecated, we'll get there 🫢).


✨ NAME ✨

down β€” acquire the semaphore. that's it. that's the whole vibe. πŸ‘‘


🌸 SYNOPSIS 🌸

void down (struct semaphore *sem );

literally one function, one argument, zero drama. slay.


πŸŽ€ ARGUMENTS πŸŽ€

  • sem β€” the semaphore to be acquired. the main character of this whole operation, fr fr πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

So. down acquires the semaphore. Simple enough, right? But here's the tea: if no more tasks are allowed to acquire the semaphore, calling this function will put the task to sleep 😴 until the semaphore is released. like it just goes night-night. no cap.

🚨 BESTIE, READ THIS PART 🚨 β€” use of this function is deprecated. please use down_interruptible or down_killable instead. this is not a drill, it's giving "legacy code energy" and we don't stan πŸ’€

I know, I know. iconic function, but it's time to move on. the newer ones ate, ngl. ✨


πŸ”₯ SEE ALSO πŸ”₯

go read those, they're literally the upgrade path and they're serving 🧚


🌈 a little sign-off 🌈

this page lives under ./kernel/locking, and it's dated October 2026 β€” so if you're reading this in the future, hiiiii, hope the kernel is thriving πŸ’œ

now go forth and use down_interruptible instead, bestie. your future self will thank you. periodt. πŸ’…πŸŽ€

πŸ“¦ where this page comes from