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