• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * Copyright (C) 2017  Red Hat, Inc.
4  */
5 
6 #ifndef LAPI_MEMFD_H__
7 #define LAPI_MEMFD_H__
8 
9 /* flags for memfd_create(2) (unsigned int) */
10 #ifndef MFD_CLOEXEC
11 # define MFD_CLOEXEC             0x0001U
12 #endif
13 #ifndef MFD_ALLOW_SEALING
14 # define MFD_ALLOW_SEALING       0x0002U
15 #endif
16 
17 /* flags for memfd_create(3) and memfd_create(4) */
18 #ifndef MFD_HUGETLB
19 #define MFD_HUGETLB 0x0004U
20 #endif
21 
22 #ifndef MFD_HUGE_64KB
23 #define MFD_HUGE_64KB (16 << 26)
24 #endif
25 #ifndef MFD_HUGE_512KB
26 #define MFD_HUGE_512KB (19 << 26)
27 #endif
28 #ifndef MFD_HUGE_2MB
29 #define MFD_HUGE_2MB (21 << 26)
30 #endif
31 #ifndef MFD_HUGE_8MB
32 #define MFD_HUGE_8MB (23 << 26)
33 #endif
34 #ifndef MFD_HUGE_16MB
35 #define MFD_HUGE_16MB (24 << 26)
36 #endif
37 #ifndef MFD_HUGE_256MB
38 #define MFD_HUGE_256MB (28 << 26)
39 #endif
40 #ifndef MFD_HUGE_1GB
41 #define MFD_HUGE_1GB (30 << 26)
42 #endif
43 #ifndef MFD_HUGE_2GB
44 #define MFD_HUGE_2GB (31 << 26)
45 #endif
46 #ifndef MFD_HUGE_16GB
47 #define MFD_HUGE_16GB (34 << 26)
48 #endif
49 
50 #endif /* LAPI_MEMFD_H__ */
51