rt_mutex_init_proxy_locked(9)
π
rt_mutex_init_proxy_locked β the kernel API manual, but make it make sense
okay so bestie, we're in the Kernel API Manual today and the star of the show is rt_mutex_init_proxy_locked(9). yes it's a mouthful. no you don't have to say it out loud. π
β¨ NAME β¨
rt_mutex_init_proxy_locked β initialize and lock a rt_mutex on behalf of a proxy owner π«Ά
like, you're doing the locking, but the credit goes to someone else. main character energy by proxy, literally.
πΈ SYNOPSIS πΈ
void rt_mutex_init_proxy_locked (struct rt_mutex_base *lock , struct task_struct *proxy_owner );
that's it. that's the whole signature. no return value, we just vibe. β¨
π¦ ARGUMENTS π¦
lockβ thert_mutexto be locked. yes, the actual mutex. the thing itself. π₯proxy_ownerβ the task to set as owner. so like, the mutex gets locked but this task's name is on the lease. iykyk. π
π DESCRIPTION π
No locking. Caller has to do serializing itself. like, the function is not gonna hold your hand here, bestie β you do the serializing, it just does the init-and-lock thing. π
This is a Special API call for PI-futex support. it initializes the rtmutex and assigns it to proxy_owner. π«
and here's the cute part: concurrent operations on the rtmutex are not possible at this point, because the pi_state which contains the rtmutex is not yet visible to other tasks. so nobody else can even see it yet. it's giving private account, no followers, zero drama. π
not me stressing the "no locking" bit again but fr fr β the serialization is your job, not the function's. don't come for this API when it doesn't do it for you. π
π§ SEE ALSO π§
Kernel file ./kernel/locking/rtmutex_api.c β 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(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)
okay that's the whole page, you ate that π
and a little sign-off for the credits stans: this one lives in ./kernel/locking, dated October 2026, page rt_mutex_init_proxy_locked(9). slay. π
ππ
π¦ 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