summaryrefslogtreecommitdiff
path: root/src/arch/sparc/solaris/solaris.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/sparc/solaris/solaris.cc')
-rw-r--r--src/arch/sparc/solaris/solaris.cc29
1 files changed, 27 insertions, 2 deletions
diff --git a/src/arch/sparc/solaris/solaris.cc b/src/arch/sparc/solaris/solaris.cc
index e17de3af0..afedcfe88 100644
--- a/src/arch/sparc/solaris/solaris.cc
+++ b/src/arch/sparc/solaris/solaris.cc
@@ -28,10 +28,11 @@
* Authors: Ali Saidi
*/
-#include <fcntl.h>
-
#include "arch/sparc/solaris/solaris.hh"
+#include <fcntl.h>
+#include <sys/mman.h>
+
// open(2) flags translation table
SyscallFlagTransTable SparcSolaris::openFlagTable[] = {
#ifdef _MSC_VER
@@ -76,3 +77,27 @@ SyscallFlagTransTable SparcSolaris::openFlagTable[] = {
const int SparcSolaris::NUM_OPEN_FLAGS =
(sizeof(SparcSolaris::openFlagTable)/sizeof(SparcSolaris::openFlagTable[0]));
+// mmap(2) flags translation table
+SyscallFlagTransTable SparcSolaris::mmapFlagTable[] = {
+ { TGT_MAP_SHARED, MAP_SHARED },
+ { TGT_MAP_PRIVATE, MAP_PRIVATE },
+ { TGT_MAP_32BIT, MAP_32BIT},
+ { TGT_MAP_ANON, MAP_ANON },
+ { TGT_MAP_DENYWRITE, MAP_DENYWRITE },
+ { TGT_MAP_EXECUTABLE, MAP_EXECUTABLE },
+ { TGT_MAP_FILE, MAP_FILE },
+ { TGT_MAP_GROWSDOWN, MAP_GROWSDOWN },
+ { TGT_MAP_HUGETLB, MAP_HUGETLB },
+ { TGT_MAP_LOCKED, MAP_LOCKED },
+ { TGT_MAP_NONBLOCK, MAP_NONBLOCK },
+ { TGT_MAP_NORESERVE, MAP_NORESERVE },
+ { TGT_MAP_POPULATE, MAP_POPULATE },
+ { TGT_MAP_STACK, MAP_STACK },
+ { TGT_MAP_ANONYMOUS, MAP_ANONYMOUS },
+ { TGT_MAP_FIXED, MAP_FIXED },
+};
+
+const unsigned SparcSolaris::NUM_MMAP_FLAGS =
+ sizeof(SparcSolaris::mmapFlagTable) /
+ sizeof(SparcSolaris::mmapFlagTable[0]);
+