• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Generated by ./xlat/gen.sh from ./xlat/timerfdflags.in; do not edit. */
2 
3 #include "gcc_compat.h"
4 #include "static_assert.h"
5 
6 #if defined(TFD_TIMER_ABSTIME) || (defined(HAVE_DECL_TFD_TIMER_ABSTIME) && HAVE_DECL_TFD_TIMER_ABSTIME)
7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
8 static_assert((TFD_TIMER_ABSTIME) == ((1 << 0)), "TFD_TIMER_ABSTIME != (1 << 0)");
9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
10 #else
11 # define TFD_TIMER_ABSTIME (1 << 0)
12 #endif
13 #if defined(TFD_TIMER_CANCEL_ON_SET) || (defined(HAVE_DECL_TFD_TIMER_CANCEL_ON_SET) && HAVE_DECL_TFD_TIMER_CANCEL_ON_SET)
14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
15 static_assert((TFD_TIMER_CANCEL_ON_SET) == ((1 << 1)), "TFD_TIMER_CANCEL_ON_SET != (1 << 1)");
16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
17 #else
18 # define TFD_TIMER_CANCEL_ON_SET (1 << 1)
19 #endif
20 #if defined TFD_CLOEXEC || defined O_CLOEXEC
21 #if defined(TFD_CLOEXEC) || (defined(HAVE_DECL_TFD_CLOEXEC) && HAVE_DECL_TFD_CLOEXEC)
22 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
23 static_assert((TFD_CLOEXEC) == (O_CLOEXEC), "TFD_CLOEXEC != O_CLOEXEC");
24 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
25 #else
26 # define TFD_CLOEXEC O_CLOEXEC
27 #endif
28 #endif
29 #if defined(TFD_NONBLOCK) || (defined(HAVE_DECL_TFD_NONBLOCK) && HAVE_DECL_TFD_NONBLOCK)
30 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
31 static_assert((TFD_NONBLOCK) == (O_NONBLOCK), "TFD_NONBLOCK != O_NONBLOCK");
32 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
33 #else
34 # define TFD_NONBLOCK O_NONBLOCK
35 #endif
36 
37 #ifndef XLAT_MACROS_ONLY
38 
39 # ifdef IN_MPERS
40 
41 #  error static const struct xlat timerfdflags in mpers mode
42 
43 # else
44 
45 static
46 const struct xlat timerfdflags[] = {
47 
48 
49  XLAT(TFD_TIMER_ABSTIME),
50  XLAT(TFD_TIMER_CANCEL_ON_SET),
51 #if defined TFD_CLOEXEC || defined O_CLOEXEC
52  XLAT(TFD_CLOEXEC),
53 #endif
54  XLAT(TFD_NONBLOCK),
55  XLAT_END
56 };
57 
58 # endif /* !IN_MPERS */
59 
60 #endif /* !XLAT_MACROS_ONLY */
61