rt_mutex_lock_killable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– rt_mutex_lock_killable β€” like, the Kernel API Manual, but make it cute ✨

Okay bestie, so you've stumbled into the kernel's locking docs (iconic of you) and today's main character is rt_mutex_lock_killable. The name is a whole mouthful but honestly? The vibe is simple: you want the lock, and you're allowed to bail if a signal comes knocking. No cap.


🌸 NAME 🌸

rt_mutex_lock_killable β€” lock a rt_mutex, but killable. That's literally it, that's the whole personality. πŸŽ€


✨ SYNOPSIS ✨

int rt_mutex_lock_killable (struct rt_mutex *lock );

Look at her. One function, one argument, one int coming back at you. Lowkey elegant, highkey underrated. πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • lock β€” the rt_mutex to be locked. This is the mutex, the one you're trying to get your hands on. Give it the lock, get the lock. Slay. πŸ”₯

⭐ RETURN ⭐

So here's what she gives back to you, and it's giving "yes or interrupted":

  • 0 β€” on success. You got the lock bestie, go do your little critical section, you earned it. πŸ’–
  • -EINTR β€” when interrupted by a signal. Not a failure era, just a "hey, something poked you, come back later" moment. πŸ™ˆ
Fr fr, don't just ignore that -EINTR β€” that's a real value with real meaning, iykyk.

🌈 SEE ALSO 🌈

The whole friend group, gathered in the Kernel file ./kernel/locking/rtmutex_api.c 🫢:

Like, the entire rtmutex cinematic universe. Obsessed. πŸ’œ


And that's the page, bestie 🧚 β€” brought to you straight outta ./kernel/locking, dated October 2026, and signed off with love by rt_mutex_lock_killable(9). Go forth and lock responsibly, -EINTR and all βœ¨πŸ“πŸ¦‹

πŸ“¦ where this page comes from