1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef SANDBOX_LINUX_SYSTEM_HEADERS_ANDROID_FUTEX_H_
6 #define SANDBOX_LINUX_SYSTEM_HEADERS_ANDROID_FUTEX_H_
8 #if !defined(FUTEX_WAIT)
12 #if !defined(FUTEX_WAKE)
16 #if !defined(FUTEX_FD)
20 #if !defined(FUTEX_REQUEUE)
21 #define FUTEX_REQUEUE 3
24 #if !defined(FUTEX_CMP_REQUEUE)
25 #define FUTEX_CMP_REQUEUE 4
28 #if !defined(FUTEX_WAKE_OP)
29 #define FUTEX_WAKE_OP 5
32 #if !defined(FUTEX_LOCK_PI)
33 #define FUTEX_LOCK_PI 6
36 #if !defined(FUTEX_UNLOCK_PI)
37 #define FUTEX_UNLOCK_PI 7
40 #if !defined(FUTEX_TRYLOCK_PI)
41 #define FUTEX_TRYLOCK_PI 8
44 #if !defined(FUTEX_WAIT_BITSET)
45 #define FUTEX_WAIT_BITSET 9
48 #if !defined(FUTEX_WAKE_BITSET)
49 #define FUTEX_WAKE_BITSET 10
52 #if !defined(FUTEX_WAIT_REQUEUE_PI)
53 #define FUTEX_WAIT_REQUEUE_PI 11
56 #if !defined(FUTEX_CMP_REQUEUE_PI)
57 #define FUTEX_CMP_REQUEUE_PI 12
60 #if !defined(FUTEX_PRIVATE_FLAG)
61 #define FUTEX_PRIVATE_FLAG 128
64 #if !defined FUTEX_CLOCK_REALTIME
65 #define FUTEX_CLOCK_REALTIME 256
68 #if !defined(FUTEX_CMD_MASK)
69 #define FUTEX_CMD_MASK ~(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME)
72 #if !defined(FUTEX_CMP_REQUEUE_PI_PRIVATE)
73 #define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | FUTEX_PRIVATE_FLAG)
76 #if !defined(FUTEX_UNLOCK_PI_PRIVATE)
77 #define FUTEX_UNLOCK_PI_PRIVATE (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG)
80 #endif // SANDBOX_LINUX_SYSTEM_HEADERS_ANDROID_FUTEX_H_