arch_futex_atomic_op_inuser(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ 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 with op πŸ’–
  • oval β€” the old value at uaddr. 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 🌈


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, -EAGAIN and -ENOSYS are 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