rt_mutex_wait_proxy_lock(9)
β¨ rt_mutex_wait_proxy_lock(9) β¨
okay bestie, so we're deep in the Kernel API Manual today and this one is a whole mood β it's the "wait for the lock somebody else started for you" call π . Buckle up, it's giving very niche-but-iconic kernel-locking energy.
πΈ SYNOPSIS πΈ
int rt_mutex_wait_proxy_lock (struct rt_mutex_base *lock , struct
hrtimer_sleeper *to , struct rt_mutex_waiter *waiter );
π ARGUMENTS π
lockβ thert_mutexwe were woken on. literally the lock in question, bestie π«Άtoβ the timeout, or null if there isn't one. heads up: thehrtimershould already have been started before you get here β°waiterβ the pre-initializedrt_mutex_waiter. yes, pre-initialized β do that part first, don't show up unprepared π
π¦ DESCRIPTION π¦
So here's the vibe: this call waits for the lock acquisition that was started on our behalf by rt_mutex_start_proxy_lock β¨. It's a team-effort situation β someone else kicked it off, and now we're just here waiting for it to land.
π important: upon failure, the caller must call rt_mutex_cleanup_proxy_lock. not optional. no cap. clean up after yourself.
Also, this is a special API call for PI-futex support β that's the whole reason it exists, iykyk π
π₯ RETURN π₯
0β success, we ate π<0β error, and it's one of-EINTRor-ETIMEDOUTπ
π SEE ALSO π
Kernel file ./kernel/locking/rtmutex_api.c β the source of truth, go read it bestie π
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_init_proxy_locked(9)rt_mutex_proxy_unlock(9)__rt_mutex_start_proxy_lock(9)rt_mutex_start_proxy_lock(9)rt_mutex_cleanup_proxy_lock(9)
okay that's the whole page, mwah π β brought to you by ./kernel/locking, the October 2026 edition of rt_mutex_wait_proxy_lock(9). go wait on that lock, you gorgeous icon, and remember to clean up πβ¨
π¦ 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