huangcm
2025-08-25 f350412dc55c15118d0a7925d1071877498e5e24
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/* Generated by ./xlat/gen.sh from ./xlat/mlockall_flags.in; do not edit. */
 
#include "gcc_compat.h"
#include "static_assert.h"
 
#if defined __alpha__ || defined __powerpc__ || defined __powerpc64__ || defined __sparc__
#if defined(MCL_CURRENT) || (defined(HAVE_DECL_MCL_CURRENT) && HAVE_DECL_MCL_CURRENT)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((MCL_CURRENT) == (0x2000), "MCL_CURRENT != 0x2000");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define MCL_CURRENT 0x2000
#endif
#if defined(MCL_FUTURE) || (defined(HAVE_DECL_MCL_FUTURE) && HAVE_DECL_MCL_FUTURE)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((MCL_FUTURE) == (0x4000), "MCL_FUTURE != 0x4000");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define MCL_FUTURE 0x4000
#endif
#if defined(MCL_ONFAULT) || (defined(HAVE_DECL_MCL_ONFAULT) && HAVE_DECL_MCL_ONFAULT)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((MCL_ONFAULT) == (0x8000), "MCL_ONFAULT != 0x8000");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define MCL_ONFAULT 0x8000
#endif
#else
#if defined(MCL_CURRENT) || (defined(HAVE_DECL_MCL_CURRENT) && HAVE_DECL_MCL_CURRENT)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((MCL_CURRENT) == (1), "MCL_CURRENT != 1");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define MCL_CURRENT 1
#endif
#if defined(MCL_FUTURE) || (defined(HAVE_DECL_MCL_FUTURE) && HAVE_DECL_MCL_FUTURE)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((MCL_FUTURE) == (2), "MCL_FUTURE != 2");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define MCL_FUTURE 2
#endif
#if defined(MCL_ONFAULT) || (defined(HAVE_DECL_MCL_ONFAULT) && HAVE_DECL_MCL_ONFAULT)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((MCL_ONFAULT) == (4), "MCL_ONFAULT != 4");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define MCL_ONFAULT 4
#endif
#endif
 
#ifndef XLAT_MACROS_ONLY
 
# ifdef IN_MPERS
 
#  error static const struct xlat mlockall_flags in mpers mode
 
# else
 
static
const struct xlat mlockall_flags[] = {
#if defined __alpha__ || defined __powerpc__ || defined __powerpc64__ || defined __sparc__
 XLAT(MCL_CURRENT),
 XLAT(MCL_FUTURE),
 XLAT(MCL_ONFAULT),
#else
 XLAT(MCL_CURRENT),
 XLAT(MCL_FUTURE),
 XLAT(MCL_ONFAULT),
#endif
 XLAT_END
};
 
# endif /* !IN_MPERS */
 
#endif /* !XLAT_MACROS_ONLY */