1 /****************************************************************************
2 ****************************************************************************
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
10 ****************************************************************************
11 ****************************************************************************/
12 #ifndef _LINUX_FUTEX_H
13 #define _LINUX_FUTEX_H
15 #include <linux/sched.h>
20 #define FUTEX_REQUEUE 3
21 #define FUTEX_CMP_REQUEUE 4
22 #define FUTEX_WAKE_OP 5
23 #define FUTEX_LOCK_PI 6
24 #define FUTEX_UNLOCK_PI 7
25 #define FUTEX_TRYLOCK_PI 8
28 struct robust_list __user *next;
31 struct robust_list_head {
33 struct robust_list list;
37 struct robust_list __user *list_op_pending;
40 #define FUTEX_WAITERS 0x80000000
42 #define FUTEX_OWNER_DIED 0x40000000
44 #define FUTEX_TID_MASK 0x3fffffff
46 #define ROBUST_LIST_LIMIT 2048
48 #define FUTEX_OP_SET 0
49 #define FUTEX_OP_ADD 1
51 #define FUTEX_OP_ANDN 3
52 #define FUTEX_OP_XOR 4
53 #define FUTEX_OP_OPARG_SHIFT 8
54 #define FUTEX_OP_CMP_EQ 0
55 #define FUTEX_OP_CMP_NE 1
56 #define FUTEX_OP_CMP_LT 2
57 #define FUTEX_OP_CMP_LE 3
58 #define FUTEX_OP_CMP_GT 4
59 #define FUTEX_OP_CMP_GE 5
60 #define FUTEX_OP(op, oparg, cmp, cmparg) (((op & 0xf) << 28) | ((cmp & 0xf) << 24) | ((oparg & 0xfff) << 12) | (cmparg & 0xfff))