syscall.sh / riscv64 / futex

futex

fast user-space locking

sys_futex(u32 *uaddr, int op, u32 val, const struct __kernel_timespec *utime, u32 *uaddr2, u32 val3)
number98 (0x62)
abi64
entry pointsys_futex
sinceLinux 4.15
man pagefutex(2)
sourceelixir.bootlin.com

Registers

registervalue
a798, the syscall number
a0u32 *uaddr
a1int op
a2u32 val
a3const struct __kernel_timespec *utime
a4u32 *uaddr2
a5u32 val3
a0the return value

Then run ecall to enter the kernel.

Same syscall on other architectures

Get this as JSON: https://api.syscall.sh/v2/syscalls/riscv64/futex