/* Generated by ./src/xlat/gen.sh from ./src/xlat/ioprio_class.in; do not edit. */

#include "gcc_compat.h"
#include "static_assert.h"

#if defined(IOPRIO_CLASS_NONE) || (defined(HAVE_DECL_IOPRIO_CLASS_NONE) && HAVE_DECL_IOPRIO_CLASS_NONE)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((IOPRIO_CLASS_NONE) == (0), "IOPRIO_CLASS_NONE != 0");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define IOPRIO_CLASS_NONE 0
#endif
#if defined(IOPRIO_CLASS_RT) || (defined(HAVE_DECL_IOPRIO_CLASS_RT) && HAVE_DECL_IOPRIO_CLASS_RT)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((IOPRIO_CLASS_RT) == (1), "IOPRIO_CLASS_RT != 1");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define IOPRIO_CLASS_RT 1
#endif
#if defined(IOPRIO_CLASS_BE) || (defined(HAVE_DECL_IOPRIO_CLASS_BE) && HAVE_DECL_IOPRIO_CLASS_BE)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((IOPRIO_CLASS_BE) == (2), "IOPRIO_CLASS_BE != 2");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define IOPRIO_CLASS_BE 2
#endif
#if defined(IOPRIO_CLASS_IDLE) || (defined(HAVE_DECL_IOPRIO_CLASS_IDLE) && HAVE_DECL_IOPRIO_CLASS_IDLE)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((IOPRIO_CLASS_IDLE) == (3), "IOPRIO_CLASS_IDLE != 3");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define IOPRIO_CLASS_IDLE 3
#endif
#undef XLAT_PREV_VAL

#ifndef XLAT_MACROS_ONLY

# ifdef IN_MPERS

#  error static const struct xlat ioprio_class in mpers mode

# else

DIAG_PUSH_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
static const struct xlat_data ioprio_class_xdata[] = {
 [IOPRIO_CLASS_NONE] = XLAT(IOPRIO_CLASS_NONE),
 #define XLAT_VAL_0 ((unsigned) (IOPRIO_CLASS_NONE))
 #define XLAT_STR_0 STRINGIFY(IOPRIO_CLASS_NONE)
 [IOPRIO_CLASS_RT] = XLAT(IOPRIO_CLASS_RT),
 #define XLAT_VAL_1 ((unsigned) (IOPRIO_CLASS_RT))
 #define XLAT_STR_1 STRINGIFY(IOPRIO_CLASS_RT)
 [IOPRIO_CLASS_BE] = XLAT(IOPRIO_CLASS_BE),
 #define XLAT_VAL_2 ((unsigned) (IOPRIO_CLASS_BE))
 #define XLAT_STR_2 STRINGIFY(IOPRIO_CLASS_BE)
 [IOPRIO_CLASS_IDLE] = XLAT(IOPRIO_CLASS_IDLE),
 #define XLAT_VAL_3 ((unsigned) (IOPRIO_CLASS_IDLE))
 #define XLAT_STR_3 STRINGIFY(IOPRIO_CLASS_IDLE)
};
static
const struct xlat ioprio_class[1] = { {
 .data = ioprio_class_xdata,
 .size = ARRAY_SIZE(ioprio_class_xdata),
 .type = XT_INDEXED,
 .flags_mask = 0
#  ifdef XLAT_VAL_0
  | XLAT_VAL_0
#  endif
#  ifdef XLAT_VAL_1
  | XLAT_VAL_1
#  endif
#  ifdef XLAT_VAL_2
  | XLAT_VAL_2
#  endif
#  ifdef XLAT_VAL_3
  | XLAT_VAL_3
#  endif
  ,
 .flags_strsz = 0
#  ifdef XLAT_STR_0
  + sizeof(XLAT_STR_0)
#  endif
#  ifdef XLAT_STR_1
  + sizeof(XLAT_STR_1)
#  endif
#  ifdef XLAT_STR_2
  + sizeof(XLAT_STR_2)
#  endif
#  ifdef XLAT_STR_3
  + sizeof(XLAT_STR_3)
#  endif
  ,
} };
DIAG_POP_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE

#  undef XLAT_STR_0
#  undef XLAT_VAL_0
#  undef XLAT_STR_1
#  undef XLAT_VAL_1
#  undef XLAT_STR_2
#  undef XLAT_VAL_2
#  undef XLAT_STR_3
#  undef XLAT_VAL_3
# endif /* !IN_MPERS */

#endif /* !XLAT_MACROS_ONLY */
