rt_mutex_wait_proxy_lock(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 β€” the rt_mutex we were woken on. literally the lock in question, bestie 🫢
  • to β€” the timeout, or null if there isn't one. heads up: the hrtimer should already have been started before you get here ⏰
  • waiter β€” the pre-initialized rt_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 -EINTR or -ETIMEDOUT πŸ™ˆ

🌈 SEE ALSO 🌈

Kernel file ./kernel/locking/rtmutex_api.c β€” the source of truth, go read it bestie πŸ“–


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