futex_syscall(9)
π¦ 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 atuaddr, but ngl it varies by op. so don't come for me if it's something elsetimeoutβ usually an absolutestruct 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 extraval3β varies by op. mystery queen. we love a flexible parameter β¨opflagsβ flags you bitwise OR intoop, likeFUTEX_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 π
- the kernel file
./tools/perf/bench/futex.hπ futex_wait(9)futex_wake(9)futex_lock_pi(9)futex_unlock_pi(9)futex_cmp_requeue(9)futex_wait_requeue_pi(9)futex_cmp_requeue_pi(9)
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
- 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