Commit cb8c4312 authored by peterz@infradead.org's avatar peterz@infradead.org Committed by Peter Zijlstra
Browse files

futex: Add sys_futex_wait()



To complement sys_futex_waitv()/wake(), add sys_futex_wait(). This
syscall implements what was previously known as FUTEX_WAIT_BITSET
except it uses 'unsigned long' for the value and bitmask arguments,
takes timespec and clockid_t arguments for the absolute timeout and
uses FUTEX2 flags.

The 'unsigned long' allows FUTEX2_SIZE_U64 on 64bit platforms.

Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/20230921105248.164324363@noisy.programming.kicks-ass.net
parent 43adf844
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -493,3 +493,4 @@
561	common	cachestat			sys_cachestat
562	common	fchmodat2			sys_fchmodat2
563	common	futex_wake			sys_futex_wake
564	common	futex_wait			sys_futex_wait
+1 −0
Original line number Diff line number Diff line
@@ -467,3 +467,4 @@
451	common	cachestat			sys_cachestat
452	common	fchmodat2			sys_fchmodat2
454	common	futex_wake			sys_futex_wake
455	common	futex_wait			sys_futex_wait
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@
#define __ARM_NR_compat_set_tls		(__ARM_NR_COMPAT_BASE + 5)
#define __ARM_NR_COMPAT_END		(__ARM_NR_COMPAT_BASE + 0x800)

#define __NR_compat_syscalls		455
#define __NR_compat_syscalls		456
#endif

#define __ARCH_WANT_SYS_CLONE
+2 −0
Original line number Diff line number Diff line
@@ -913,6 +913,8 @@ __SYSCALL(__NR_cachestat, sys_cachestat)
__SYSCALL(__NR_fchmodat2, sys_fchmodat2)
#define __NR_futex_wake 454
__SYSCALL(__NR_futex_wake, sys_futex_wake)
#define __NR_futex_wait 455
__SYSCALL(__NR_futex_wait, sys_futex_wait)

/*
 * Please add new compat syscalls above this comment and update
+1 −0
Original line number Diff line number Diff line
@@ -374,3 +374,4 @@
451	common	cachestat			sys_cachestat
452	common	fchmodat2			sys_fchmodat2
454	common	futex_wake			sys_futex_wake
455	common	futex_wait			sys_futex_wait
Loading