2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-29 05:18:00 +00:00

headers: Move MADV definitions to own mman.h

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov 2013-11-14 22:48:30 +04:00 committed by Pavel Emelyanov
parent 8c7a62c4e6
commit ce3b4aaafa
4 changed files with 18 additions and 32 deletions

View File

@ -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)

View File

@ -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;

17
include/mman.h Normal file
View File

@ -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__ */

View File

@ -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"