fixup_pi_owner(9)
β¨ fixup_pi_owner β¨
okay bestie, welcome to the Kernel API Manual π this one's a little kernel-side cleanup queen and she's lowkey iconic. let's get into it.
πΈ NAME πΈ
fixup_pi_owner β post lock pi_state and corner case management π
π¦ SYNOPSIS π¦
int fixup_pi_owner (u32 __user *uaddr , struct futex_q *q , int locked );
π ARGUMENTS π
uaddrβ the user address of the futex, no cap πqβ afutex_q, which containspi_stateand gives you access to thert_mutexπ§lockedβ did the attempt to take thert_mutexsucceed (1) or not (0)? that's the whole vibe check right there π
π₯ DESCRIPTION π₯
so after you attempt to lock an rt_mutex, this function gets called to clean up the pi_state owner and handle the race conditions that might just let us acquire the lock π literally doing two jobs and serving both.
β οΈ important bestie: this must be called with the hb lock held. not optional, not a suggestion, it's giving mandatory π
β RETURN β
1β success, lock taken π0β success, lock not taken π«Ά<0β on error (-EFAULT) π
π SEE ALSO π
- Kernel file
./kernel/futex/pi.c futex_lock_pi_atomic(9)
π and that's the whole page, bestie! this lil slice of kernel API manual energy came from ./kernel/futex and it's dated October 2026 β go off, futex files, periodt π
π¦ 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