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