1 /* Generated by ./xlat/gen.sh from ./xlat/sched_flags.in; do not edit. */ 2 3 #include "gcc_compat.h" 4 #include "static_assert.h" 5 6 #if defined(SCHED_FLAG_RESET_ON_FORK) || (defined(HAVE_DECL_SCHED_FLAG_RESET_ON_FORK) && HAVE_DECL_SCHED_FLAG_RESET_ON_FORK) 7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 8 static_assert((SCHED_FLAG_RESET_ON_FORK) == (1), "SCHED_FLAG_RESET_ON_FORK != 1"); 9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 10 #else 11 # define SCHED_FLAG_RESET_ON_FORK 1 12 #endif 13 #if defined(SCHED_FLAG_RECLAIM) || (defined(HAVE_DECL_SCHED_FLAG_RECLAIM) && HAVE_DECL_SCHED_FLAG_RECLAIM) 14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 15 static_assert((SCHED_FLAG_RECLAIM) == (2), "SCHED_FLAG_RECLAIM != 2"); 16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 17 #else 18 # define SCHED_FLAG_RECLAIM 2 19 #endif 20 #if defined(SCHED_FLAG_DL_OVERRUN) || (defined(HAVE_DECL_SCHED_FLAG_DL_OVERRUN) && HAVE_DECL_SCHED_FLAG_DL_OVERRUN) 21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 22 static_assert((SCHED_FLAG_DL_OVERRUN) == (4), "SCHED_FLAG_DL_OVERRUN != 4"); 23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 24 #else 25 # define SCHED_FLAG_DL_OVERRUN 4 26 #endif 27 28 #ifndef XLAT_MACROS_ONLY 29 30 # ifdef IN_MPERS 31 32 # error static const struct xlat sched_flags in mpers mode 33 34 # else 35 36 static 37 const struct xlat sched_flags[] = { 38 XLAT(SCHED_FLAG_RESET_ON_FORK), 39 XLAT(SCHED_FLAG_RECLAIM), 40 XLAT(SCHED_FLAG_DL_OVERRUN), 41 XLAT_END 42 }; 43 44 # endif /* !IN_MPERS */ 45 46 #endif /* !XLAT_MACROS_ONLY */ 47