down_killable(9)
π 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 returns0.
π SEE ALSO π
- Kernel file
./kernel/locking/semaphore.c down(9),down_interruptible(9),down_trylock(9),down_timeout(9),up(9)
Source/vibe location: ./kernel/locking; date stamp: October 2026. Catch you later bestie, down_killable(9) out ππ«Άβ¨
π¦ 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