down_killable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

down_killable β€” acquire the semaphore unless killed. Welcome to the down_killable(9) manual page bestie, this is the semaphore-acquiring-with-a-fatal-signal-escape-hatch situation πŸ’…

✨ SYNOPSIS ✨

int down_killable (struct semaphore *sem );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • sem β€” the semaphore to be acquired. That’s the thing you’re trying to snag, no cap.

πŸ’… DESCRIPTION πŸ’…

Okay so this function attempts to acquire the semaphore. If no more tasks are allowed to acquire the semaphore, calling this function will put the task to sleep. If that sleep gets interrupted by a fatal signal, this function will return -EINTR. If the semaphore is successfully acquired, this function returns 0. Periodt ✨

Lowkey important: it’s the fatal signal interruption that returns -EINTR; successful acquisition returns 0.

🌈 SEE ALSO 🌈


Source/vibe location: ./kernel/locking; date stamp: October 2026. Catch you later bestie, down_killable(9) out πŸ’–πŸ«Άβœ¨

πŸ“¦ where this page comes from