futex_syscall(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ futex_syscall(9) β€” the Kernel API Manual, bestie edition πŸ¦‹

okay so this is a page from the Kernel API Manual and it's literally about futex_syscall, which is the wrapper around the SYS_futex syscall. buckle up, we're going in πŸ’…


🌸 NAME 🌸

futex_syscall β€” the SYS_futex syscall wrapper. yes that's it. that's the whole name section. iconic brevity.


✨ SYNOPSIS ✨

int futex_syscall (volatile u_int32_t *uaddr , int op , u_int32_t val ,
struct timespec *timeout , volatile u_int32_t *uaddr2 , int val3 , int
opflags );

seven arguments. seven. she's high-maintenance but she delivers 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • uaddr β€” the address of the first futex. that's her home base πŸ’–
  • op β€” the futex op code. which move are we doing, queen?
  • val β€” typically the expected value sitting at uaddr, but ngl it varies by op. so don't come for me if it's something else
  • timeout β€” usually an absolute struct timespec (except where it says otherwise!!). some ops straight-up overload this one, so read the fine print πŸ™ˆ
  • uaddr2 β€” the address of the second futex, for the ops that need two. yes, some of them are that extra
  • val3 β€” varies by op. mystery queen. we love a flexible parameter ✨
  • opflags β€” flags you bitwise OR into op, like FUTEX_PRIVATE_FLAG. OR them in, bestie, that's the whole vibe πŸ”₯

πŸ’œ DESCRIPTION πŸ’œ

futex_syscall is used by all of the following futex op wrappers. all of them. she's the main character and everyone else is her supporting cast πŸ‘‘

she can also be used for misuse and abuse testing 😭 like, go off, but you were warned. generally though? use the specific op wrappers instead. they're the well-behaved ones and honestly you'll have a better time.

these argument descriptions are the defaults for all the like-named arguments in the following wrappers β€” except where noted below. so if something says otherwise down the page, that note wins. periodt. πŸ’…

no cap: this page is literally the reference for the arguments of every wrapper that follows, so keep it open in another tab. you'll thank me later 🫢

🌈 SEE ALSO 🌈

that's the whole friend group right there. say hi to all of them for me πŸ’–


and that's the page!! mwah πŸ’‹ this little gem lives in ./tools/perf/bench and she's dated October 2026 β€” mark your calendars, bestie, she's a whole era β­πŸ§šβ€β™€οΈπŸ“

πŸ“¦ where this page comes from