Skip to content

Commit cb8c431

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: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Thomas Gleixner <[email protected]> Acked-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 43adf84 commit cb8c431

File tree

24 files changed

+156
-57
lines changed

24 files changed

+156
-57
lines changed

‎arch/alpha/kernel/syscalls/syscall.tbl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,3 +493,4 @@
493493
561 common cachestat sys_cachestat
494494
562 common fchmodat2 sys_fchmodat2
495495
563 common futex_wake sys_futex_wake
496+
564 common futex_wait sys_futex_wait

‎arch/arm/tools/syscall.tbl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,3 +467,4 @@
467467
451 common cachestat sys_cachestat
468468
452 common fchmodat2 sys_fchmodat2
469469
454 common futex_wake sys_futex_wake
470+
455 common futex_wait sys_futex_wait

‎arch/arm64/include/asm/unistd.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE + 5)
4040
#define __ARM_NR_COMPAT_END (__ARM_NR_COMPAT_BASE + 0x800)
4141

42-
#define __NR_compat_syscalls 455
42+
#define __NR_compat_syscalls 456
4343
#endif
4444

4545
#define __ARCH_WANT_SYS_CLONE

‎arch/arm64/include/asm/unistd32.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -913,6 +913,8 @@ __SYSCALL(__NR_cachestat, sys_cachestat)
913913
__SYSCALL(__NR_fchmodat2, sys_fchmodat2)
914914
#define __NR_futex_wake 454
915915
__SYSCALL(__NR_futex_wake, sys_futex_wake)
916+
#define __NR_futex_wait 455
917+
__SYSCALL(__NR_futex_wait, sys_futex_wait)
916918

917919
/*
918920
* Please add new compat syscalls above this comment and update

‎arch/ia64/kernel/syscalls/syscall.tbl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,3 +374,4 @@
374374
451 common cachestat sys_cachestat
375375
452 common fchmodat2 sys_fchmodat2
376376
454 common futex_wake sys_futex_wake
377+
455 common futex_wait sys_futex_wait

‎arch/m68k/kernel/syscalls/syscall.tbl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,3 +453,4 @@
453453
451 common cachestat sys_cachestat
454454
452 common fchmodat2 sys_fchmodat2
455455
454 common futex_wake sys_futex_wake
456+
455 common futex_wait sys_futex_wait

‎arch/microblaze/kernel/syscalls/syscall.tbl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,3 +459,4 @@
459459
451 common cachestat sys_cachestat
460460
452 common fchmodat2 sys_fchmodat2
461461
454 common futex_wake sys_futex_wake
462+
455 common futex_wait sys_futex_wait

‎arch/mips/kernel/syscalls/syscall_n32.tbl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,3 +392,4 @@
392392
451 n32 cachestat sys_cachestat
393393
452 n32 fchmodat2 sys_fchmodat2
394394
454 n32 futex_wake sys_futex_wake
395+
455 n32 futex_wait sys_futex_wait

‎arch/mips/kernel/syscalls/syscall_n64.tbl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,3 +368,4 @@
368368
451 n64 cachestat sys_cachestat
369369
452 n64 fchmodat2 sys_fchmodat2
370370
454 n64 futex_wake sys_futex_wake
371+
455 n64 futex_wait sys_futex_wait

‎arch/mips/kernel/syscalls/syscall_o32.tbl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,3 +441,4 @@
441441
451 o32 cachestat sys_cachestat
442442
452 o32 fchmodat2 sys_fchmodat2
443443
454 o32 futex_wake sys_futex_wake
444+
455 o32 futex_wait sys_futex_wait

0 commit comments

Comments
 (0)