122851890Sopenharmony_ci/****************************************************************************
222851890Sopenharmony_ci ****************************************************************************
322851890Sopenharmony_ci ***
422851890Sopenharmony_ci ***   This header was automatically generated from a Linux kernel header
522851890Sopenharmony_ci ***   of the same name, to make information necessary for userspace to
622851890Sopenharmony_ci ***   call into the kernel available to libc.  It contains only constants,
722851890Sopenharmony_ci ***   structures, and macros generated from the original header, and thus,
822851890Sopenharmony_ci ***   contains no copyrightable information.
922851890Sopenharmony_ci ***
1022851890Sopenharmony_ci ***   To edit the content of this header, modify the corresponding
1122851890Sopenharmony_ci ***   source file (e.g. under external/kernel-headers/original/) then
1222851890Sopenharmony_ci ***   run bionic/libc/kernel/tools/update_all.py
1322851890Sopenharmony_ci ***
1422851890Sopenharmony_ci ***   Any manual change here will be lost the next time this script will
1522851890Sopenharmony_ci ***   be run. You've been warned!
1622851890Sopenharmony_ci ***
1722851890Sopenharmony_ci ****************************************************************************
1822851890Sopenharmony_ci ****************************************************************************/
1922851890Sopenharmony_ci#ifndef _UAPI_LINUX_FUTEX_H
2022851890Sopenharmony_ci#define _UAPI_LINUX_FUTEX_H
2122851890Sopenharmony_ci#include <linux/compiler.h>
2222851890Sopenharmony_ci#include <linux/types.h>
2322851890Sopenharmony_ci#define FUTEX_WAIT 0
2422851890Sopenharmony_ci#define FUTEX_WAKE 1
2522851890Sopenharmony_ci#define FUTEX_FD 2
2622851890Sopenharmony_ci#define FUTEX_REQUEUE 3
2722851890Sopenharmony_ci#define FUTEX_CMP_REQUEUE 4
2822851890Sopenharmony_ci#define FUTEX_WAKE_OP 5
2922851890Sopenharmony_ci#define FUTEX_LOCK_PI 6
3022851890Sopenharmony_ci#define FUTEX_UNLOCK_PI 7
3122851890Sopenharmony_ci#define FUTEX_TRYLOCK_PI 8
3222851890Sopenharmony_ci#define FUTEX_WAIT_BITSET 9
3322851890Sopenharmony_ci#define FUTEX_WAKE_BITSET 10
3422851890Sopenharmony_ci#define FUTEX_WAIT_REQUEUE_PI 11
3522851890Sopenharmony_ci#define FUTEX_CMP_REQUEUE_PI 12
3622851890Sopenharmony_ci#define FUTEX_PRIVATE_FLAG 128
3722851890Sopenharmony_ci#define FUTEX_CLOCK_REALTIME 256
3822851890Sopenharmony_ci#define FUTEX_CMD_MASK ~(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME)
3922851890Sopenharmony_ci#define FUTEX_WAIT_PRIVATE (FUTEX_WAIT | FUTEX_PRIVATE_FLAG)
4022851890Sopenharmony_ci#define FUTEX_WAKE_PRIVATE (FUTEX_WAKE | FUTEX_PRIVATE_FLAG)
4122851890Sopenharmony_ci#define FUTEX_REQUEUE_PRIVATE (FUTEX_REQUEUE | FUTEX_PRIVATE_FLAG)
4222851890Sopenharmony_ci#define FUTEX_CMP_REQUEUE_PRIVATE (FUTEX_CMP_REQUEUE | FUTEX_PRIVATE_FLAG)
4322851890Sopenharmony_ci#define FUTEX_WAKE_OP_PRIVATE (FUTEX_WAKE_OP | FUTEX_PRIVATE_FLAG)
4422851890Sopenharmony_ci#define FUTEX_LOCK_PI_PRIVATE (FUTEX_LOCK_PI | FUTEX_PRIVATE_FLAG)
4522851890Sopenharmony_ci#define FUTEX_UNLOCK_PI_PRIVATE (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG)
4622851890Sopenharmony_ci#define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG)
4722851890Sopenharmony_ci#define FUTEX_WAIT_BITSET_PRIVATE (FUTEX_WAIT_BITSET | FUTEX_PRIVATE_FLAG)
4822851890Sopenharmony_ci#define FUTEX_WAKE_BITSET_PRIVATE (FUTEX_WAKE_BITSET | FUTEX_PRIVATE_FLAG)
4922851890Sopenharmony_ci#define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | FUTEX_PRIVATE_FLAG)
5022851890Sopenharmony_ci#define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | FUTEX_PRIVATE_FLAG)
5122851890Sopenharmony_cistruct robust_list {
5222851890Sopenharmony_ci  struct robust_list __user * next;
5322851890Sopenharmony_ci};
5422851890Sopenharmony_cistruct robust_list_head {
5522851890Sopenharmony_ci  struct robust_list list;
5622851890Sopenharmony_ci  long futex_offset;
5722851890Sopenharmony_ci  struct robust_list __user * list_op_pending;
5822851890Sopenharmony_ci};
5922851890Sopenharmony_ci#define FUTEX_WAITERS 0x80000000
6022851890Sopenharmony_ci#define FUTEX_OWNER_DIED 0x40000000
6122851890Sopenharmony_ci#define FUTEX_TID_MASK 0x3fffffff
6222851890Sopenharmony_ci#define ROBUST_LIST_LIMIT 2048
6322851890Sopenharmony_ci#define FUTEX_BITSET_MATCH_ANY 0xffffffff
6422851890Sopenharmony_ci#define FUTEX_OP_SET 0
6522851890Sopenharmony_ci#define FUTEX_OP_ADD 1
6622851890Sopenharmony_ci#define FUTEX_OP_OR 2
6722851890Sopenharmony_ci#define FUTEX_OP_ANDN 3
6822851890Sopenharmony_ci#define FUTEX_OP_XOR 4
6922851890Sopenharmony_ci#define FUTEX_OP_OPARG_SHIFT 8
7022851890Sopenharmony_ci#define FUTEX_OP_CMP_EQ 0
7122851890Sopenharmony_ci#define FUTEX_OP_CMP_NE 1
7222851890Sopenharmony_ci#define FUTEX_OP_CMP_LT 2
7322851890Sopenharmony_ci#define FUTEX_OP_CMP_LE 3
7422851890Sopenharmony_ci#define FUTEX_OP_CMP_GT 4
7522851890Sopenharmony_ci#define FUTEX_OP_CMP_GE 5
7622851890Sopenharmony_ci#define FUTEX_OP(op,oparg,cmp,cmparg) (((op & 0xf) << 28) | ((cmp & 0xf) << 24) | ((oparg & 0xfff) << 12) | (cmparg & 0xfff))
7722851890Sopenharmony_ci#endif
78