From 5c1cc99d486870bb6942980474b535ec0917f85c Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Fri, 27 Feb 2009 09:25:33 -0800 Subject: [PATCH] X86: Add a 32 bit mmap2 system call. --- src/arch/x86/linux/linux.hh | 2 ++ src/arch/x86/linux/syscalls.cc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/arch/x86/linux/linux.hh b/src/arch/x86/linux/linux.hh index c45caa19f..c6fe28318 100644 --- a/src/arch/x86/linux/linux.hh +++ b/src/arch/x86/linux/linux.hh @@ -136,6 +136,8 @@ class X86Linux32 : public Linux // static const int TGT_O_RSYNC = 0x00040000; //!< O_RSYNC static const int NUM_OPEN_FLAGS; + + static const unsigned TGT_MAP_ANONYMOUS = 0x20; }; #endif diff --git a/src/arch/x86/linux/syscalls.cc b/src/arch/x86/linux/syscalls.cc index 1d2d8d691..7969f2e41 100644 --- a/src/arch/x86/linux/syscalls.cc +++ b/src/arch/x86/linux/syscalls.cc @@ -696,7 +696,7 @@ SyscallDesc I386LinuxProcess::syscallDescs[] = { /* 189 */ SyscallDesc("putpmsg", unimplementedFunc), /* 190 */ SyscallDesc("vfork", unimplementedFunc), /* 191 */ SyscallDesc("ugetrlimit", unimplementedFunc), - /* 192 */ SyscallDesc("mmap2", unimplementedFunc), + /* 192 */ SyscallDesc("mmap2", mmapFunc), /* 193 */ SyscallDesc("truncate64", unimplementedFunc), /* 194 */ SyscallDesc("ftruncate64", unimplementedFunc), /* 195 */ SyscallDesc("stat64", unimplementedFunc),