rt_mutex_trylock(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

rt_mutex_trylock(9) πŸ’…

okay bestie, this is the Kernel API Manual page for rt_mutex_trylock(9) β€” the try-lock girlie of the rt_mutex world. Let’s get into it. ✨

✨ NAME ✨

rt_mutex_trylock β€” try to lock a rt_mutex. That’s the whole assignment, no cap.

πŸ¦‹ SYNOPSIS πŸ¦‹

int rt_mutex_trylock (struct rt_mutex *lock );

πŸŽ€ ARGUMENTS πŸŽ€

  • lock β€” the rt_mutex to be locked. That’s the one you’re trying to lock, bestie.

🌸 DESCRIPTION 🌸

okay so here’s the tea: this function can only be called in thread context. It’s safe to call it from atomic regions, but not from hard or soft interrupt context β€” like, do not even try it, that is not the vibe. πŸ™ˆ

πŸ‘‘ RETURN πŸ‘‘

1 on success, 0 on contention. That’s it, that’s the return. Periodt. πŸ’…

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./kernel/locking/rtmutex_api.c β€” noted, bestie.

mwah πŸ’‹ β€” source/version: ./kernel/locking; date: October 2026; page: rt_mutex_trylock(9). 🫢

πŸ“¦ where this page comes from