• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  ****************************************************************************
3  ***
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.
9  ***
10  ****************************************************************************
11  ****************************************************************************/
12 #ifndef _LINUX_FUTEX_H
13 #define _LINUX_FUTEX_H
14 
15 #include <linux/sched.h>
16 
17 #define FUTEX_WAIT 0
18 #define FUTEX_WAKE 1
19 #define FUTEX_FD 2
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
26 
27 struct robust_list {
28  struct robust_list __user *next;
29 };
30 
31 struct robust_list_head {
32 
33  struct robust_list list;
34 
35  long futex_offset;
36 
37  struct robust_list __user *list_op_pending;
38 };
39 
40 #define FUTEX_WAITERS 0x80000000
41 
42 #define FUTEX_OWNER_DIED 0x40000000
43 
44 #define FUTEX_TID_MASK 0x3fffffff
45 
46 #define ROBUST_LIST_LIMIT 2048
47 
48 #define FUTEX_OP_SET 0
49 #define FUTEX_OP_ADD 1
50 #define FUTEX_OP_OR 2
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))
61 #endif
62