down_interruptible(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 πŸ¦‹


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