2 #include <linux/futex.h> 4 #ifndef FUTEX_WAIT_BITSET 5 #define FUTEX_WAIT_BITSET 9 7 #ifndef FUTEX_WAKE_BITSET 8 #define FUTEX_WAKE_BITSET 10 10 #ifndef FUTEX_WAIT_REQUEUE_PI 11 #define FUTEX_WAIT_REQUEUE_PI 11 13 #ifndef FUTEX_CMP_REQUEUE_PI 14 #define FUTEX_CMP_REQUEUE_PI 12 16 #ifndef FUTEX_CLOCK_REALTIME 17 #define FUTEX_CLOCK_REALTIME 256 22 enum syscall_futex_args {
26 SCF_TIMEOUT = (1 << 3),
27 SCF_UADDR2 = (1 << 4),
35 #define P_FUTEX_OP(n) case FUTEX_##n: printed = scnprintf(bf, size, #n); 37 P_FUTEX_OP(WAKE); arg->
mask |= SCF_VAL3|SCF_UADDR2|SCF_TIMEOUT;
break;
43 P_FUTEX_OP(LOCK_PI); arg->
mask |= SCF_VAL3|SCF_UADDR2|SCF_TIMEOUT;
break;
44 P_FUTEX_OP(UNLOCK_PI); arg->
mask |= SCF_VAL3|SCF_UADDR2|SCF_TIMEOUT;
break;
49 default: printed = scnprintf(bf, size,
"%#x", cmd);
break;
53 printed += scnprintf(bf + printed, size - printed,
"|PRIV");
56 printed += scnprintf(bf + printed, size - printed,
"|CLKRT");
61 #define SCA_FUTEX_OP syscall_arg__scnprintf_futex_op
static size_t syscall_arg__scnprintf_futex_op(char *bf, size_t size, struct syscall_arg *arg)
#define FUTEX_CLOCK_REALTIME