arch_futex_atomic_op_inuser(9)
π arch_futex_atomic_op_inuser(9) β the kernel API manual, bestie edition π
okay so this is a page from the Kernel API Manual and it's all about arch_futex_atomic_op_inuser. say it with me: arch Β· futex Β· atomic Β· op Β· in Β· user. iconic name, honestly. it does an atomic arithmetic operation with a constant argument, plus a comparison of the previous futex value against another constant π
β¨ NAME β¨
arch_futex_atomic_op_inuser β atomic arithmetic operation with constant argument and comparison of the previous futex value with another constant.
like, it's doing math atomically and peeking at what the futex value was before. multitasking queen π
π¦ SYNOPSIS π¦
int arch_futex_atomic_op_inuser (int op , u32 oparg , int *oval , u32
__user *uaddr );
four arguments, one int return, no cap π«Ά
πΈ ARGUMENTS πΈ
opβ the operation to execute. this is the "what are we even doing here" parameter β¨opargβ the argument to the operation. the little sidekick that goes withopπovalβ the old value atuaddr. bestie's getting the receipts of what was there before πuaddrβ pointer to a user space address. yes, user space, so be respectful of the boundary π§
π₯ RETURN π₯
the return value is literally the whole vibe check, so listen up:
0β on success. slay π-EFAULTβ user access resulted in a page fault π the address did not want to be touched-EAGAINβ the atomic operation was unable to complete due to contention π try again energy-ENOSYSβ operation not supported π the architecture said "not today"
π SEE ALSO π
- kernel file
./arch/um/kernel/skas/uaccess.c futex_atomic_cmpxchg_inatomic(9)β the cousin function, go say hi π¦
ngl bestie, this is architecture-specific low-level stuff β the funky per-arch futex plumbing β so treat those return codes like the gospel fr fr.-EFAULT,-EAGAINand-ENOSYSare all meaningful, not just noise β
and that's the whole page! sign-off time π this came out of ./arch/um/kernel/skas, dated October 2026, and the page itself is arch_futex_atomic_op_inuser(9). 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