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