__rt_mutex_init(9)
π
__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β thert_mutexthat'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:
rt_mutex_lock_nested(9)rt_mutex_lock(9)rt_mutex_lock_interruptible(9)rt_mutex_lock_killable(9)rt_mutex_trylock(9)rt_mutex_unlock(9)__rt_mutex_futex_unlock(9)rt_mutex_init_proxy_locked(9)rt_mutex_proxy_unlock(9)__rt_mutex_start_proxy_lock(9)rt_mutex_start_proxy_lock(9)rt_mutex_wait_proxy_lock(9)rt_mutex_cleanup_proxy_lock(9)
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
- 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