down_interruptible(9)
β¨ NAME β¨
okay bestie, meet down_interruptible from the Kernel API Manual β yes, the header energy is down_interruptible(9), but we're folding that in right here instead of copying the line. What does it do? acquire the semaphore unless interrupted. That's the whole assignment, no cap.
πΈ SYNOPSIS πΈ
int down_interruptible (struct semaphore *sem );
π ARGUMENTS π
semβ the semaphore to be acquired. That's the one you're trying to snag, bestie.
π DESCRIPTION π
So here's the tea: 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. Lowkey rude, but that's the locking life. If the sleep is interrupted by a signal, this function will return -EINTR. And if the semaphore is successfully acquired, this function returns 0. slay.
π¦ SEE ALSO π¦
- Kernel file
./kernel/locking/semaphore.c down(9)down_killable(9)down_trylock(9)down_timeout(9)up(9)
that's the whole page, bestie! Source/version vibe: ./kernel/locking; date: October 2026; filed under down_interruptible(9). mwah ππ«Ά
π¦ 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