__rt_mutex_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __rt_mutex_init(9) β€” like, the Kernel API Manual, bestie πŸŽ€

okay so welcome to the glow-up era of the rt_mutex β€” this is the Kernel API Manual page for __rt_mutex_init, and we're gonna get you so comfy with it ✨


🌸 NAME 🌸

__rt_mutex_init β€” initialize the rt_mutex, that's the whole job, no cap πŸ’–


✨ SYNOPSIS ✨

void __rt_mutex_init (struct rt_mutex *lock , const char *name , struct
       lock_class_key *key );

like yes bestie that's the whole signature, she's giving function-that-returns-void energy (because she literally does 🫢)


🧚 ARGUMENTS 🧚

  • lock β€” the rt_mutex that's getting initialized, she's the main character here πŸ‘‘
  • name β€” the lock name, and it's used for debugging only, so it's the little name tag at the party 🏷️
  • key β€” the lock class key, also used for debugging πŸ” like it's the vip pass for the debugger, iykyk

πŸ’… DESCRIPTION πŸ’…

so what she does is: initialize the rt_mutex to the unlocked state. slay, clean, simple, iconic 🌈

🚨 but listen β€” initializing a locked rt_mutex is not allowed. fr fr, do not do it. that's the one vibe killer on this page and we are not doing it 😭

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./kernel/locking/rtmutex_api.c β€” go read her, she's the source of truth πŸ’œ

and the whole friend group:


alright that's the page!! πŸ¦‹ big sign-off energy: this one lives in ./kernel/locking, dated October 2026, and honestly? she ate πŸ’…βœ¨ πŸ“

πŸ“¦ where this page comes from