Home | History | Annotate | Download | only in linux
      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  ***   To edit the content of this header, modify the corresponding
     11  ***   source file (e.g. under external/kernel-headers/original/) then
     12  ***   run bionic/libc/kernel/tools/update_all.py
     13  ***
     14  ***   Any manual change here will be lost the next time this script will
     15  ***   be run. You've been warned!
     16  ***
     17  ****************************************************************************
     18  ****************************************************************************/
     19 #ifndef _UAPI_LINUX_FUTEX_H
     20 #define _UAPI_LINUX_FUTEX_H
     21 #include <linux/compiler.h>
     22 #include <linux/types.h>
     23 #define FUTEX_WAIT 0
     24 #define FUTEX_WAKE 1
     25 #define FUTEX_FD 2
     26 #define FUTEX_REQUEUE 3
     27 #define FUTEX_CMP_REQUEUE 4
     28 #define FUTEX_WAKE_OP 5
     29 #define FUTEX_LOCK_PI 6
     30 #define FUTEX_UNLOCK_PI 7
     31 #define FUTEX_TRYLOCK_PI 8
     32 #define FUTEX_WAIT_BITSET 9
     33 #define FUTEX_WAKE_BITSET 10
     34 #define FUTEX_WAIT_REQUEUE_PI 11
     35 #define FUTEX_CMP_REQUEUE_PI 12
     36 #define FUTEX_PRIVATE_FLAG 128
     37 #define FUTEX_CLOCK_REALTIME 256
     38 #define FUTEX_CMD_MASK ~(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME)
     39 #define FUTEX_WAIT_PRIVATE (FUTEX_WAIT | FUTEX_PRIVATE_FLAG)
     40 #define FUTEX_WAKE_PRIVATE (FUTEX_WAKE | FUTEX_PRIVATE_FLAG)
     41 #define FUTEX_REQUEUE_PRIVATE (FUTEX_REQUEUE | FUTEX_PRIVATE_FLAG)
     42 #define FUTEX_CMP_REQUEUE_PRIVATE (FUTEX_CMP_REQUEUE | FUTEX_PRIVATE_FLAG)
     43 #define FUTEX_WAKE_OP_PRIVATE (FUTEX_WAKE_OP | FUTEX_PRIVATE_FLAG)
     44 #define FUTEX_LOCK_PI_PRIVATE (FUTEX_LOCK_PI | FUTEX_PRIVATE_FLAG)
     45 #define FUTEX_UNLOCK_PI_PRIVATE (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG)
     46 #define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG)
     47 #define FUTEX_WAIT_BITSET_PRIVATE (FUTEX_WAIT_BITSET | FUTEX_PRIVATE_FLAG)
     48 #define FUTEX_WAKE_BITSET_PRIVATE (FUTEX_WAKE_BITSET | FUTEX_PRIVATE_FLAG)
     49 #define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | FUTEX_PRIVATE_FLAG)
     50 #define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | FUTEX_PRIVATE_FLAG)
     51 struct robust_list {
     52   struct robust_list __user * next;
     53 };
     54 struct robust_list_head {
     55   struct robust_list list;
     56   long futex_offset;
     57   struct robust_list __user * list_op_pending;
     58 };
     59 #define FUTEX_WAITERS 0x80000000
     60 #define FUTEX_OWNER_DIED 0x40000000
     61 #define FUTEX_TID_MASK 0x3fffffff
     62 #define ROBUST_LIST_LIMIT 2048
     63 #define FUTEX_BITSET_MATCH_ANY 0xffffffff
     64 #define FUTEX_OP_SET 0
     65 #define FUTEX_OP_ADD 1
     66 #define FUTEX_OP_OR 2
     67 #define FUTEX_OP_ANDN 3
     68 #define FUTEX_OP_XOR 4
     69 #define FUTEX_OP_OPARG_SHIFT 8
     70 #define FUTEX_OP_CMP_EQ 0
     71 #define FUTEX_OP_CMP_NE 1
     72 #define FUTEX_OP_CMP_LT 2
     73 #define FUTEX_OP_CMP_LE 3
     74 #define FUTEX_OP_CMP_GT 4
     75 #define FUTEX_OP_CMP_GE 5
     76 #define FUTEX_OP(op,oparg,cmp,cmparg) (((op & 0xf) << 28) | ((cmp & 0xf) << 24) | ((oparg & 0xfff) << 12) | (cmparg & 0xfff))
     77 #endif
     78