1 /* Generated by ./xlat/gen.sh from ./xlat/futexops.in; do not edit. */ 2 3 #include "gcc_compat.h" 4 #include "static_assert.h" 5 6 #if defined(FUTEX_WAIT) || (defined(HAVE_DECL_FUTEX_WAIT) && HAVE_DECL_FUTEX_WAIT) 7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 8 static_assert((FUTEX_WAIT) == (0), "FUTEX_WAIT != 0"); 9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 10 #else 11 # define FUTEX_WAIT 0 12 #endif 13 #if defined(FUTEX_WAKE) || (defined(HAVE_DECL_FUTEX_WAKE) && HAVE_DECL_FUTEX_WAKE) 14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 15 static_assert((FUTEX_WAKE) == (1), "FUTEX_WAKE != 1"); 16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 17 #else 18 # define FUTEX_WAKE 1 19 #endif 20 #if defined(FUTEX_FD) || (defined(HAVE_DECL_FUTEX_FD) && HAVE_DECL_FUTEX_FD) 21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 22 static_assert((FUTEX_FD) == (2), "FUTEX_FD != 2"); 23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 24 #else 25 # define FUTEX_FD 2 26 #endif 27 #if defined(FUTEX_REQUEUE) || (defined(HAVE_DECL_FUTEX_REQUEUE) && HAVE_DECL_FUTEX_REQUEUE) 28 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 29 static_assert((FUTEX_REQUEUE) == (3), "FUTEX_REQUEUE != 3"); 30 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 31 #else 32 # define FUTEX_REQUEUE 3 33 #endif 34 #if defined(FUTEX_CMP_REQUEUE) || (defined(HAVE_DECL_FUTEX_CMP_REQUEUE) && HAVE_DECL_FUTEX_CMP_REQUEUE) 35 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 36 static_assert((FUTEX_CMP_REQUEUE) == (4), "FUTEX_CMP_REQUEUE != 4"); 37 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 38 #else 39 # define FUTEX_CMP_REQUEUE 4 40 #endif 41 #if defined(FUTEX_WAKE_OP) || (defined(HAVE_DECL_FUTEX_WAKE_OP) && HAVE_DECL_FUTEX_WAKE_OP) 42 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 43 static_assert((FUTEX_WAKE_OP) == (5), "FUTEX_WAKE_OP != 5"); 44 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 45 #else 46 # define FUTEX_WAKE_OP 5 47 #endif 48 #if defined(FUTEX_LOCK_PI) || (defined(HAVE_DECL_FUTEX_LOCK_PI) && HAVE_DECL_FUTEX_LOCK_PI) 49 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 50 static_assert((FUTEX_LOCK_PI) == (6), "FUTEX_LOCK_PI != 6"); 51 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 52 #else 53 # define FUTEX_LOCK_PI 6 54 #endif 55 #if defined(FUTEX_UNLOCK_PI) || (defined(HAVE_DECL_FUTEX_UNLOCK_PI) && HAVE_DECL_FUTEX_UNLOCK_PI) 56 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 57 static_assert((FUTEX_UNLOCK_PI) == (7), "FUTEX_UNLOCK_PI != 7"); 58 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 59 #else 60 # define FUTEX_UNLOCK_PI 7 61 #endif 62 #if defined(FUTEX_TRYLOCK_PI) || (defined(HAVE_DECL_FUTEX_TRYLOCK_PI) && HAVE_DECL_FUTEX_TRYLOCK_PI) 63 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 64 static_assert((FUTEX_TRYLOCK_PI) == (8), "FUTEX_TRYLOCK_PI != 8"); 65 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 66 #else 67 # define FUTEX_TRYLOCK_PI 8 68 #endif 69 #if defined(FUTEX_WAIT_BITSET) || (defined(HAVE_DECL_FUTEX_WAIT_BITSET) && HAVE_DECL_FUTEX_WAIT_BITSET) 70 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 71 static_assert((FUTEX_WAIT_BITSET) == (9), "FUTEX_WAIT_BITSET != 9"); 72 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 73 #else 74 # define FUTEX_WAIT_BITSET 9 75 #endif 76 #if defined(FUTEX_WAKE_BITSET) || (defined(HAVE_DECL_FUTEX_WAKE_BITSET) && HAVE_DECL_FUTEX_WAKE_BITSET) 77 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 78 static_assert((FUTEX_WAKE_BITSET) == (10), "FUTEX_WAKE_BITSET != 10"); 79 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 80 #else 81 # define FUTEX_WAKE_BITSET 10 82 #endif 83 #if defined(FUTEX_WAIT_REQUEUE_PI) || (defined(HAVE_DECL_FUTEX_WAIT_REQUEUE_PI) && HAVE_DECL_FUTEX_WAIT_REQUEUE_PI) 84 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 85 static_assert((FUTEX_WAIT_REQUEUE_PI) == (11), "FUTEX_WAIT_REQUEUE_PI != 11"); 86 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 87 #else 88 # define FUTEX_WAIT_REQUEUE_PI 11 89 #endif 90 #if defined(FUTEX_CMP_REQUEUE_PI) || (defined(HAVE_DECL_FUTEX_CMP_REQUEUE_PI) && HAVE_DECL_FUTEX_CMP_REQUEUE_PI) 91 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 92 static_assert((FUTEX_CMP_REQUEUE_PI) == (12), "FUTEX_CMP_REQUEUE_PI != 12"); 93 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 94 #else 95 # define FUTEX_CMP_REQUEUE_PI 12 96 #endif 97 #if defined(FUTEX_WAIT_PRIVATE) || (defined(HAVE_DECL_FUTEX_WAIT_PRIVATE) && HAVE_DECL_FUTEX_WAIT_PRIVATE) 98 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 99 static_assert((FUTEX_WAIT_PRIVATE) == ((FUTEX_WAIT | FUTEX_PRIVATE_FLAG)), "FUTEX_WAIT_PRIVATE != (FUTEX_WAIT | FUTEX_PRIVATE_FLAG)"); 100 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 101 #else 102 # define FUTEX_WAIT_PRIVATE (FUTEX_WAIT | FUTEX_PRIVATE_FLAG) 103 #endif 104 #if defined(FUTEX_WAKE_PRIVATE) || (defined(HAVE_DECL_FUTEX_WAKE_PRIVATE) && HAVE_DECL_FUTEX_WAKE_PRIVATE) 105 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 106 static_assert((FUTEX_WAKE_PRIVATE) == ((FUTEX_WAKE | FUTEX_PRIVATE_FLAG)), "FUTEX_WAKE_PRIVATE != (FUTEX_WAKE | FUTEX_PRIVATE_FLAG)"); 107 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 108 #else 109 # define FUTEX_WAKE_PRIVATE (FUTEX_WAKE | FUTEX_PRIVATE_FLAG) 110 #endif 111 #if defined(FUTEX_REQUEUE_PRIVATE) || (defined(HAVE_DECL_FUTEX_REQUEUE_PRIVATE) && HAVE_DECL_FUTEX_REQUEUE_PRIVATE) 112 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 113 static_assert((FUTEX_REQUEUE_PRIVATE) == ((FUTEX_REQUEUE | FUTEX_PRIVATE_FLAG)), "FUTEX_REQUEUE_PRIVATE != (FUTEX_REQUEUE | FUTEX_PRIVATE_FLAG)"); 114 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 115 #else 116 # define FUTEX_REQUEUE_PRIVATE (FUTEX_REQUEUE | FUTEX_PRIVATE_FLAG) 117 #endif 118 #if defined(FUTEX_CMP_REQUEUE_PRIVATE) || (defined(HAVE_DECL_FUTEX_CMP_REQUEUE_PRIVATE) && HAVE_DECL_FUTEX_CMP_REQUEUE_PRIVATE) 119 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 120 static_assert((FUTEX_CMP_REQUEUE_PRIVATE) == ((FUTEX_CMP_REQUEUE | FUTEX_PRIVATE_FLAG)), "FUTEX_CMP_REQUEUE_PRIVATE != (FUTEX_CMP_REQUEUE | FUTEX_PRIVATE_FLAG)"); 121 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 122 #else 123 # define FUTEX_CMP_REQUEUE_PRIVATE (FUTEX_CMP_REQUEUE | FUTEX_PRIVATE_FLAG) 124 #endif 125 #if defined(FUTEX_WAKE_OP_PRIVATE) || (defined(HAVE_DECL_FUTEX_WAKE_OP_PRIVATE) && HAVE_DECL_FUTEX_WAKE_OP_PRIVATE) 126 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 127 static_assert((FUTEX_WAKE_OP_PRIVATE) == ((FUTEX_WAKE_OP | FUTEX_PRIVATE_FLAG)), "FUTEX_WAKE_OP_PRIVATE != (FUTEX_WAKE_OP | FUTEX_PRIVATE_FLAG)"); 128 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 129 #else 130 # define FUTEX_WAKE_OP_PRIVATE (FUTEX_WAKE_OP | FUTEX_PRIVATE_FLAG) 131 #endif 132 #if defined(FUTEX_LOCK_PI_PRIVATE) || (defined(HAVE_DECL_FUTEX_LOCK_PI_PRIVATE) && HAVE_DECL_FUTEX_LOCK_PI_PRIVATE) 133 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 134 static_assert((FUTEX_LOCK_PI_PRIVATE) == ((FUTEX_LOCK_PI | FUTEX_PRIVATE_FLAG)), "FUTEX_LOCK_PI_PRIVATE != (FUTEX_LOCK_PI | FUTEX_PRIVATE_FLAG)"); 135 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 136 #else 137 # define FUTEX_LOCK_PI_PRIVATE (FUTEX_LOCK_PI | FUTEX_PRIVATE_FLAG) 138 #endif 139 #if defined(FUTEX_UNLOCK_PI_PRIVATE) || (defined(HAVE_DECL_FUTEX_UNLOCK_PI_PRIVATE) && HAVE_DECL_FUTEX_UNLOCK_PI_PRIVATE) 140 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 141 static_assert((FUTEX_UNLOCK_PI_PRIVATE) == ((FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG)), "FUTEX_UNLOCK_PI_PRIVATE != (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG)"); 142 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 143 #else 144 # define FUTEX_UNLOCK_PI_PRIVATE (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG) 145 #endif 146 #if defined(FUTEX_TRYLOCK_PI_PRIVATE) || (defined(HAVE_DECL_FUTEX_TRYLOCK_PI_PRIVATE) && HAVE_DECL_FUTEX_TRYLOCK_PI_PRIVATE) 147 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 148 static_assert((FUTEX_TRYLOCK_PI_PRIVATE) == ((FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG)), "FUTEX_TRYLOCK_PI_PRIVATE != (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG)"); 149 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 150 #else 151 # define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG) 152 #endif 153 #if defined(FUTEX_WAIT_BITSET_PRIVATE) || (defined(HAVE_DECL_FUTEX_WAIT_BITSET_PRIVATE) && HAVE_DECL_FUTEX_WAIT_BITSET_PRIVATE) 154 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 155 static_assert((FUTEX_WAIT_BITSET_PRIVATE) == ((FUTEX_WAIT_BITSET | FUTEX_PRIVATE_FLAG)), "FUTEX_WAIT_BITSET_PRIVATE != (FUTEX_WAIT_BITSET | FUTEX_PRIVATE_FLAG)"); 156 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 157 #else 158 # define FUTEX_WAIT_BITSET_PRIVATE (FUTEX_WAIT_BITSET | FUTEX_PRIVATE_FLAG) 159 #endif 160 #if defined(FUTEX_WAKE_BITSET_PRIVATE) || (defined(HAVE_DECL_FUTEX_WAKE_BITSET_PRIVATE) && HAVE_DECL_FUTEX_WAKE_BITSET_PRIVATE) 161 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 162 static_assert((FUTEX_WAKE_BITSET_PRIVATE) == ((FUTEX_WAKE_BITSET | FUTEX_PRIVATE_FLAG)), "FUTEX_WAKE_BITSET_PRIVATE != (FUTEX_WAKE_BITSET | FUTEX_PRIVATE_FLAG)"); 163 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 164 #else 165 # define FUTEX_WAKE_BITSET_PRIVATE (FUTEX_WAKE_BITSET | FUTEX_PRIVATE_FLAG) 166 #endif 167 #if defined(FUTEX_WAIT_REQUEUE_PI_PRIVATE) || (defined(HAVE_DECL_FUTEX_WAIT_REQUEUE_PI_PRIVATE) && HAVE_DECL_FUTEX_WAIT_REQUEUE_PI_PRIVATE) 168 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 169 static_assert((FUTEX_WAIT_REQUEUE_PI_PRIVATE) == ((FUTEX_WAIT_REQUEUE_PI | FUTEX_PRIVATE_FLAG)), "FUTEX_WAIT_REQUEUE_PI_PRIVATE != (FUTEX_WAIT_REQUEUE_PI | FUTEX_PRIVATE_FLAG)"); 170 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 171 #else 172 # define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | FUTEX_PRIVATE_FLAG) 173 #endif 174 #if defined(FUTEX_CMP_REQUEUE_PI_PRIVATE) || (defined(HAVE_DECL_FUTEX_CMP_REQUEUE_PI_PRIVATE) && HAVE_DECL_FUTEX_CMP_REQUEUE_PI_PRIVATE) 175 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 176 static_assert((FUTEX_CMP_REQUEUE_PI_PRIVATE) == ((FUTEX_CMP_REQUEUE_PI | FUTEX_PRIVATE_FLAG)), "FUTEX_CMP_REQUEUE_PI_PRIVATE != (FUTEX_CMP_REQUEUE_PI | FUTEX_PRIVATE_FLAG)"); 177 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 178 #else 179 # define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | FUTEX_PRIVATE_FLAG) 180 #endif 181 182 #ifndef XLAT_MACROS_ONLY 183 184 # ifdef IN_MPERS 185 186 # error static const struct xlat futexops in mpers mode 187 188 # else 189 190 static 191 const struct xlat futexops[] = { 192 XLAT(FUTEX_WAIT), 193 XLAT(FUTEX_WAKE), 194 XLAT(FUTEX_FD), 195 XLAT(FUTEX_REQUEUE), 196 XLAT(FUTEX_CMP_REQUEUE), 197 XLAT(FUTEX_WAKE_OP), 198 XLAT(FUTEX_LOCK_PI), 199 XLAT(FUTEX_UNLOCK_PI), 200 XLAT(FUTEX_TRYLOCK_PI), 201 XLAT(FUTEX_WAIT_BITSET), 202 XLAT(FUTEX_WAKE_BITSET), 203 XLAT(FUTEX_WAIT_REQUEUE_PI), 204 XLAT(FUTEX_CMP_REQUEUE_PI), 205 XLAT(FUTEX_WAIT_PRIVATE), 206 XLAT(FUTEX_WAKE_PRIVATE), 207 #if defined(FUTEX_FD) || (defined(HAVE_DECL_FUTEX_FD) && HAVE_DECL_FUTEX_FD) 208 XLAT(FUTEX_FD|FUTEX_PRIVATE_FLAG), 209 #endif 210 XLAT(FUTEX_REQUEUE_PRIVATE), 211 XLAT(FUTEX_CMP_REQUEUE_PRIVATE), 212 XLAT(FUTEX_WAKE_OP_PRIVATE), 213 XLAT(FUTEX_LOCK_PI_PRIVATE), 214 XLAT(FUTEX_UNLOCK_PI_PRIVATE), 215 XLAT(FUTEX_TRYLOCK_PI_PRIVATE), 216 XLAT(FUTEX_WAIT_BITSET_PRIVATE), 217 XLAT(FUTEX_WAKE_BITSET_PRIVATE), 218 XLAT(FUTEX_WAIT_REQUEUE_PI_PRIVATE), 219 XLAT(FUTEX_CMP_REQUEUE_PI_PRIVATE), 220 #if defined(FUTEX_WAIT) || (defined(HAVE_DECL_FUTEX_WAIT) && HAVE_DECL_FUTEX_WAIT) 221 XLAT(FUTEX_WAIT|FUTEX_CLOCK_REALTIME), 222 #endif 223 #if defined(FUTEX_WAIT_PRIVATE) || (defined(HAVE_DECL_FUTEX_WAIT_PRIVATE) && HAVE_DECL_FUTEX_WAIT_PRIVATE) 224 XLAT(FUTEX_WAIT_PRIVATE|FUTEX_CLOCK_REALTIME), 225 #endif 226 #if defined(FUTEX_WAIT_BITSET) || (defined(HAVE_DECL_FUTEX_WAIT_BITSET) && HAVE_DECL_FUTEX_WAIT_BITSET) 227 XLAT(FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME), 228 #endif 229 #if defined(FUTEX_WAIT_BITSET_PRIVATE) || (defined(HAVE_DECL_FUTEX_WAIT_BITSET_PRIVATE) && HAVE_DECL_FUTEX_WAIT_BITSET_PRIVATE) 230 XLAT(FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME), 231 #endif 232 #if defined(FUTEX_WAIT_REQUEUE_PI) || (defined(HAVE_DECL_FUTEX_WAIT_REQUEUE_PI) && HAVE_DECL_FUTEX_WAIT_REQUEUE_PI) 233 XLAT(FUTEX_WAIT_REQUEUE_PI|FUTEX_CLOCK_REALTIME), 234 #endif 235 #if defined(FUTEX_WAIT_REQUEUE_PI_PRIVATE) || (defined(HAVE_DECL_FUTEX_WAIT_REQUEUE_PI_PRIVATE) && HAVE_DECL_FUTEX_WAIT_REQUEUE_PI_PRIVATE) 236 XLAT(FUTEX_WAIT_REQUEUE_PI_PRIVATE|FUTEX_CLOCK_REALTIME), 237 #endif 238 XLAT_END 239 }; 240 241 # endif /* !IN_MPERS */ 242 243 #endif /* !XLAT_MACROS_ONLY */ 244