Skip to contentSkip to conversation

Update lapi/futex.h fallback

PATCH New Andrea Cervesato 1 participant 1 message Feb 9, 2022 Library code

lore
Share & tools
lore
#0 lore raw

PATCH v5 2/3 Update lapi/futex.h fallback

Added a complete futex.h definition with futex2 support

---
 configure.ac                                  |   3 +
 include/lapi/futex.h                          | 180 ++++++++++++++++++
 include/lapi/syscalls/aarch64.in              |   1 +
 include/lapi/syscalls/arc.in                  |   1 +
 include/lapi/syscalls/arm.in                  |   1 +
 include/lapi/syscalls/hppa.in                 |   1 +
 include/lapi/syscalls/i386.in                 |   1 +
 include/lapi/syscalls/ia64.in                 |   1 +
 include/lapi/syscalls/mips_n32.in             |   1 +
 include/lapi/syscalls/mips_n64.in             |   1 +
 include/lapi/syscalls/mips_o32.in             |   1 +
 include/lapi/syscalls/powerpc.in              |   1 +
 include/lapi/syscalls/powerpc64.in            |   1 +
 include/lapi/syscalls/s390.in                 |   1 +
 include/lapi/syscalls/s390x.in                |   1 +
 include/lapi/syscalls/sh.in                   |   1 +
 include/lapi/syscalls/sparc.in                |   1 +
 include/lapi/syscalls/sparc64.in              |   1 +
 include/lapi/syscalls/x86_64.in               |   1 +
 lib/tst_checkpoint.c                          |   1 -
 testcases/kernel/syscalls/clone/clone08.c     |   1 -
 .../syscalls/futex/futex_cmp_requeue01.c      |   2 +-
 .../syscalls/futex/futex_cmp_requeue02.c      |   2 +-
 23 files changed, 202 insertions(+), 4 deletions(-)
configure.ac +3 -0
index aeb486f69..b4a8427d0 100644
@@ -51,6 +51,7 @@ AC_CHECK_HEADERS_ONCE([ \
     linux/close_range.h \
     linux/dccp.h \
     linux/fs.h \
+    linux/futex.h \
     linux/genetlink.h \
     linux/if_alg.h \
     linux/if_ether.h \
@@ -216,6 +217,8 @@ AC_CHECK_TYPES([struct xt_entry_match, struct xt_entry_target],,,[
 AC_CHECK_TYPES([struct __kernel_old_timeval, struct __kernel_old_timespec, struct __kernel_timespec,
                 struct __kernel_old_itimerspec, struct __kernel_itimerspec],,,[#include <sys/socket.h>])
 
+AC_CHECK_TYPES([struct futex_waitv],,,[#include <linux/futex.h>])
+
 # Tools knobs
 
 # Bash
include/lapi/futex.h +180 -0

196 lines not on this page · raw message

include/lapi/syscalls/aarch64.in +1 -0
index 89b63ee4b..de4ed5fb1 100644
@@ -295,4 +295,5 @@ openat2 437
 pidfd_getfd 438
 epoll_pwait2 441
 quotactl_fd 443
+futex_waitv 449
 _sysctl 1078
include/lapi/syscalls/arc.in +1 -0
index 72420754a..9f11381db 100644
@@ -315,3 +315,4 @@ openat2 437
 pidfd_getfd 438
 epoll_pwait2 441
 quotactl_fd 443
+futex_waitv 449
include/lapi/syscalls/arm.in +1 -0
index 2a78d7c3c..4b0f63a28 100644
@@ -393,3 +393,4 @@ openat2 (__NR_SYSCALL_BASE+437)
 pidfd_getfd (__NR_SYSCALL_BASE+438)
 epoll_pwait2 (__NR_SYSCALL_BASE+441)
 quotactl_fd (__NR_SYSCALL_BASE+443)
+futex_waitv (__NR_SYSCALL_BASE+449)
include/lapi/syscalls/hppa.in +1 -0
index 2f0fc8153..b6d32d386 100644
@@ -42,3 +42,4 @@ pidfd_open 434
 close_range 436
 epoll_pwait2 441
 quotactl_fd 443
+futex_waitv 449
include/lapi/syscalls/i386.in +1 -0
index 34a8a621f..d0e6e9a4b 100644
@@ -429,3 +429,4 @@ openat2 437
 pidfd_getfd 438
 epoll_pwait2 441
 quotactl_fd 443
+futex_waitv 449
include/lapi/syscalls/ia64.in +1 -0
index b729cd3f0..123200624 100644
@@ -342,3 +342,4 @@ openat2 1461
 pidfd_getfd 1462
 epoll_pwait2 1465
 quotactl_fd 1467
+futex_waitv 1473
include/lapi/syscalls/mips_n32.in +1 -0
index 46098a616..e818c9d92 100644
@@ -370,3 +370,4 @@ process_madvise 6440
 epoll_pwait2 6441
 mount_setattr 6442
 quotactl_fd 6443
+futex_waitv 6449
include/lapi/syscalls/mips_n64.in +1 -0
index 07f96ac5d..6e15f43b3 100644
@@ -346,3 +346,4 @@ process_madvise 5440
 epoll_pwait2 5441
 mount_setattr 5442
 quotactl_fd 5443
+futex_waitv 5449
include/lapi/syscalls/mips_o32.in +1 -0
index 5e64a4a1c..921d5d331 100644
@@ -416,3 +416,4 @@ process_madvise 4440
 epoll_pwait2 4441
 mount_setattr 4442
 quotactl_fd 4443
+futex_waitv 4449
include/lapi/syscalls/powerpc.in +1 -0
index f4e85940c..d5de621e1 100644
@@ -422,3 +422,4 @@ openat2 437
 pidfd_getfd 438
 epoll_pwait2 441
 quotactl_fd 443
+futex_waitv 449
include/lapi/syscalls/powerpc64.in +1 -0
index f4e85940c..d5de621e1 100644
@@ -422,3 +422,4 @@ openat2 437
 pidfd_getfd 438
 epoll_pwait2 441
 quotactl_fd 443
+futex_waitv 449
include/lapi/syscalls/s390.in +1 -0
index 3e16d8475..6505f3822 100644
@@ -409,3 +409,4 @@ openat2 437
 pidfd_getfd 438
 epoll_pwait2 441
 quotactl_fd 443
+futex_waitv 449
include/lapi/syscalls/s390x.in +1 -0
index beb0819af..bc5d2b34c 100644
@@ -357,3 +357,4 @@ openat2 437
 pidfd_getfd 438
 epoll_pwait2 441
 quotactl_fd 443
+futex_waitv 449
include/lapi/syscalls/sh.in +1 -0
index a81cf8297..316ffe5f1 100644
@@ -403,3 +403,4 @@ openat2 437
 pidfd_getfd 438
 epoll_pwait2 441
 quotactl_fd 443
+futex_waitv 449
include/lapi/syscalls/sparc.in +1 -0
index 6a7817ae5..e0c60a360 100644
@@ -408,3 +408,4 @@ openat2 437
 pidfd_getfd 438
 epoll_pwait2 441
 quotactl_fd 443
+futex_waitv 449
include/lapi/syscalls/sparc64.in +1 -0
index d3995181c..0acde6856 100644
@@ -373,3 +373,4 @@ openat2 437
 pidfd_getfd 438
 epoll_pwait2 441
 quotactl_fd 443
+futex_waitv 449
include/lapi/syscalls/x86_64.in +1 -0
index a5b2a24fe..1863e1df7 100644
@@ -350,6 +350,7 @@ openat2 437
 pidfd_getfd 438
 epoll_pwait2 441
 quotactl_fd 443
+futex_waitv 449
 rt_sigaction 512
 rt_sigreturn 513
 ioctl 514
lib/tst_checkpoint.c +0 -1
index b41986f0c..6a294b28b 100644
@@ -25,7 +25,6 @@
 #include <limits.h>
 #include <errno.h>
 #include <sys/syscall.h>
-#include <linux/futex.h>
 
 #include "test.h"
 #include "safe_macros.h"
testcases/kernel/syscalls/clone/clone08.c +0 -1
index 3de1fe9bb..ad285a497 100644
@@ -11,7 +11,6 @@
 #include <errno.h>
 #include <sched.h>
 #include <sys/wait.h>
-#include <linux/futex.h>
 
 #include "tst_test.h"
 #include "clone_platform.h"
testcases/kernel/syscalls/futex/futex_cmp_requeue01.c +1 -1
index 13e67c758..bef44838e 100644
@@ -12,12 +12,12 @@
 #include <errno.h>
 #include <sys/wait.h>
 #include <stdlib.h>
-#include <linux/futex.h>
 #include <sys/time.h>
 
 #include "tst_timer_test.h"
 #include "tst_test.h"
 #include "futextest.h"
+#include "lapi/futex.h"
 
 struct shared_data {
 	futex_t futexes[2];
testcases/kernel/syscalls/futex/futex_cmp_requeue02.c +1 -1
index 0514b0ba4..073ea3bf6 100644
@@ -13,11 +13,11 @@
  */
 
 #include <errno.h>
-#include <linux/futex.h>
 #include <sys/time.h>
 
 #include "tst_test.h"
 #include "futextest.h"
+#include "lapi/futex.h"
 
 static futex_t *futexes;
 
Signature · 5 lines
2.35.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp