1*cf84ac9aSAndroid Build Coastguard Worker /* Generated by ./xlat/gen.sh from ./xlat/ioprio_class.in; do not edit. */ 2*cf84ac9aSAndroid Build Coastguard Worker 3*cf84ac9aSAndroid Build Coastguard Worker #include "gcc_compat.h" 4*cf84ac9aSAndroid Build Coastguard Worker #include "static_assert.h" 5*cf84ac9aSAndroid Build Coastguard Worker 6*cf84ac9aSAndroid Build Coastguard Worker #if defined(IOPRIO_CLASS_NONE) || (defined(HAVE_DECL_IOPRIO_CLASS_NONE) && HAVE_DECL_IOPRIO_CLASS_NONE) 7*cf84ac9aSAndroid Build Coastguard Worker DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 8*cf84ac9aSAndroid Build Coastguard Worker static_assert((IOPRIO_CLASS_NONE) == (0), "IOPRIO_CLASS_NONE != 0"); 9*cf84ac9aSAndroid Build Coastguard Worker DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 10*cf84ac9aSAndroid Build Coastguard Worker #else 11*cf84ac9aSAndroid Build Coastguard Worker # define IOPRIO_CLASS_NONE 0 12*cf84ac9aSAndroid Build Coastguard Worker #endif 13*cf84ac9aSAndroid Build Coastguard Worker #if defined(IOPRIO_CLASS_RT) || (defined(HAVE_DECL_IOPRIO_CLASS_RT) && HAVE_DECL_IOPRIO_CLASS_RT) 14*cf84ac9aSAndroid Build Coastguard Worker DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 15*cf84ac9aSAndroid Build Coastguard Worker static_assert((IOPRIO_CLASS_RT) == (1), "IOPRIO_CLASS_RT != 1"); 16*cf84ac9aSAndroid Build Coastguard Worker DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 17*cf84ac9aSAndroid Build Coastguard Worker #else 18*cf84ac9aSAndroid Build Coastguard Worker # define IOPRIO_CLASS_RT 1 19*cf84ac9aSAndroid Build Coastguard Worker #endif 20*cf84ac9aSAndroid Build Coastguard Worker #if defined(IOPRIO_CLASS_BE) || (defined(HAVE_DECL_IOPRIO_CLASS_BE) && HAVE_DECL_IOPRIO_CLASS_BE) 21*cf84ac9aSAndroid Build Coastguard Worker DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 22*cf84ac9aSAndroid Build Coastguard Worker static_assert((IOPRIO_CLASS_BE) == (2), "IOPRIO_CLASS_BE != 2"); 23*cf84ac9aSAndroid Build Coastguard Worker DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 24*cf84ac9aSAndroid Build Coastguard Worker #else 25*cf84ac9aSAndroid Build Coastguard Worker # define IOPRIO_CLASS_BE 2 26*cf84ac9aSAndroid Build Coastguard Worker #endif 27*cf84ac9aSAndroid Build Coastguard Worker #if defined(IOPRIO_CLASS_IDLE) || (defined(HAVE_DECL_IOPRIO_CLASS_IDLE) && HAVE_DECL_IOPRIO_CLASS_IDLE) 28*cf84ac9aSAndroid Build Coastguard Worker DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 29*cf84ac9aSAndroid Build Coastguard Worker static_assert((IOPRIO_CLASS_IDLE) == (3), "IOPRIO_CLASS_IDLE != 3"); 30*cf84ac9aSAndroid Build Coastguard Worker DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 31*cf84ac9aSAndroid Build Coastguard Worker #else 32*cf84ac9aSAndroid Build Coastguard Worker # define IOPRIO_CLASS_IDLE 3 33*cf84ac9aSAndroid Build Coastguard Worker #endif 34*cf84ac9aSAndroid Build Coastguard Worker 35*cf84ac9aSAndroid Build Coastguard Worker #ifndef XLAT_MACROS_ONLY 36*cf84ac9aSAndroid Build Coastguard Worker 37*cf84ac9aSAndroid Build Coastguard Worker # ifdef IN_MPERS 38*cf84ac9aSAndroid Build Coastguard Worker 39*cf84ac9aSAndroid Build Coastguard Worker # error static const struct xlat ioprio_class in mpers mode 40*cf84ac9aSAndroid Build Coastguard Worker 41*cf84ac9aSAndroid Build Coastguard Worker # else 42*cf84ac9aSAndroid Build Coastguard Worker 43*cf84ac9aSAndroid Build Coastguard Worker static 44*cf84ac9aSAndroid Build Coastguard Worker const struct xlat ioprio_class[] = { 45*cf84ac9aSAndroid Build Coastguard Worker XLAT(IOPRIO_CLASS_NONE), 46*cf84ac9aSAndroid Build Coastguard Worker XLAT(IOPRIO_CLASS_RT), 47*cf84ac9aSAndroid Build Coastguard Worker XLAT(IOPRIO_CLASS_BE), 48*cf84ac9aSAndroid Build Coastguard Worker XLAT(IOPRIO_CLASS_IDLE), 49*cf84ac9aSAndroid Build Coastguard Worker XLAT_END 50*cf84ac9aSAndroid Build Coastguard Worker }; 51*cf84ac9aSAndroid Build Coastguard Worker 52*cf84ac9aSAndroid Build Coastguard Worker # endif /* !IN_MPERS */ 53*cf84ac9aSAndroid Build Coastguard Worker 54*cf84ac9aSAndroid Build Coastguard Worker #endif /* !XLAT_MACROS_ONLY */ 55