[PATCH] headers: Move MADV definitions to own mman.h
Cyrill Gorcunov
gorcunov at openvz.org
Thu Nov 14 05:48:23 PST 2013
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
arch/arm/include/asm/types.h | 16 ----------------
arch/x86/include/asm/types.h | 16 ----------------
include/mman.h | 17 +++++++++++++++++
proc_parse.c | 1 +
4 files changed, 18 insertions(+), 32 deletions(-)
create mode 100644 include/mman.h
diff --git a/arch/arm/include/asm/types.h b/arch/arm/include/asm/types.h
index b45869224adc..27da1734176d 100644
--- a/arch/arm/include/asm/types.h
+++ b/arch/arm/include/asm/types.h
@@ -104,22 +104,6 @@ struct user_vfp_exc {
# define PAGE_MASK (~(PAGE_SIZE - 1))
#endif
-#ifndef MAP_HUGETLB
-# define MAP_HUGETLB 0x40000
-#endif
-
-#ifndef MADV_HUGEPAGE
-# define MADV_HUGEPAGE 14
-#endif
-
-#ifndef MADV_NOHUGEPAGE
-# define MADV_NOHUGEPAGE 15
-#endif
-
-#ifndef MADV_DONTDUMP
-# define MADV_DONTDUMP 16
-#endif
-
#define REG_RES(regs) ((regs).ARM_r0)
#define REG_IP(regs) ((regs).ARM_pc)
#define REG_SYSCALL_NR(regs) ((regs).ARM_r7)
diff --git a/arch/x86/include/asm/types.h b/arch/x86/include/asm/types.h
index 66b843f4159c..965122eeddbb 100644
--- a/arch/x86/include/asm/types.h
+++ b/arch/x86/include/asm/types.h
@@ -119,22 +119,6 @@ typedef struct {
# define PAGE_MASK (~(PAGE_SIZE - 1))
#endif
-#ifndef MAP_HUGETLB
-# define MAP_HUGETLB 0x40000
-#endif
-
-#ifndef MADV_HUGEPAGE
-# define MADV_HUGEPAGE 14
-#endif
-
-#ifndef MADV_NOHUGEPAGE
-# define MADV_NOHUGEPAGE 15
-#endif
-
-#ifndef MADV_DONTDUMP
-# define MADV_DONTDUMP 16
-#endif
-
#define TASK_SIZE ((1UL << 47) - PAGE_SIZE)
typedef uint64_t auxv_t;
diff --git a/include/mman.h b/include/mman.h
new file mode 100644
index 000000000000..340d36927152
--- /dev/null
+++ b/include/mman.h
@@ -0,0 +1,17 @@
+#ifndef __CR_MMAN_H__
+#define __CR_MMAN_H__
+
+#ifndef MAP_HUGETLB
+# define MAP_HUGETLB 0x40000
+#endif
+#ifndef MADV_HUGEPAGE
+# define MADV_HUGEPAGE 14
+#endif
+#ifndef MADV_NOHUGEPAGE
+# define MADV_NOHUGEPAGE 15
+#endif
+#ifndef MADV_DONTDUMP
+# define MADV_DONTDUMP 16
+#endif
+
+#endif /* __CR_MMAN_H__ */
diff --git a/proc_parse.c b/proc_parse.c
index fee4bf916fee..d38d90e4823c 100644
--- a/proc_parse.c
+++ b/proc_parse.c
@@ -13,6 +13,7 @@
#include "list.h"
#include "util.h"
#include "mount.h"
+#include "mman.h"
#include "cpu.h"
#include "file-lock.h"
#include "pstree.h"
--
1.8.3.1
--Q68bSM7Ycu6FN28Q--
More information about the CRIU
mailing list