solaris.cc (11381:516213d2f0cf) solaris.cc (11383:5ac090acd180)
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 14 unchanged lines hidden (view full) ---

23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * Authors: Ali Saidi
29 */
30
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 14 unchanged lines hidden (view full) ---

23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * Authors: Ali Saidi
29 */
30
31#include <fcntl.h>
32
33#include "arch/sparc/solaris/solaris.hh"
34
31#include "arch/sparc/solaris/solaris.hh"
32
33#include <fcntl.h>
34#include <sys/mman.h>
35
35// open(2) flags translation table
36SyscallFlagTransTable SparcSolaris::openFlagTable[] = {
37#ifdef _MSC_VER
38 { SparcSolaris::TGT_O_RDONLY, _O_RDONLY },
39 { SparcSolaris::TGT_O_WRONLY, _O_WRONLY },
40 { SparcSolaris::TGT_O_RDWR, _O_RDWR },
41 { SparcSolaris::TGT_O_APPEND, _O_APPEND },
42 { SparcSolaris::TGT_O_CREAT, _O_CREAT },

--- 28 unchanged lines hidden (view full) ---

71 { SparcSolaris::TGT_O_RSYNC, O_SYNC },
72#endif
73#endif /* _MSC_VER */
74};
75
76const int SparcSolaris::NUM_OPEN_FLAGS =
77 (sizeof(SparcSolaris::openFlagTable)/sizeof(SparcSolaris::openFlagTable[0]));
78
36// open(2) flags translation table
37SyscallFlagTransTable SparcSolaris::openFlagTable[] = {
38#ifdef _MSC_VER
39 { SparcSolaris::TGT_O_RDONLY, _O_RDONLY },
40 { SparcSolaris::TGT_O_WRONLY, _O_WRONLY },
41 { SparcSolaris::TGT_O_RDWR, _O_RDWR },
42 { SparcSolaris::TGT_O_APPEND, _O_APPEND },
43 { SparcSolaris::TGT_O_CREAT, _O_CREAT },

--- 28 unchanged lines hidden (view full) ---

72 { SparcSolaris::TGT_O_RSYNC, O_SYNC },
73#endif
74#endif /* _MSC_VER */
75};
76
77const int SparcSolaris::NUM_OPEN_FLAGS =
78 (sizeof(SparcSolaris::openFlagTable)/sizeof(SparcSolaris::openFlagTable[0]));
79
80// mmap(2) flags translation table
81SyscallFlagTransTable SparcSolaris::mmapFlagTable[] = {
82 { TGT_MAP_SHARED, MAP_SHARED },
83 { TGT_MAP_PRIVATE, MAP_PRIVATE },
84 { TGT_MAP_32BIT, MAP_32BIT},
85 { TGT_MAP_ANON, MAP_ANON },
86 { TGT_MAP_DENYWRITE, MAP_DENYWRITE },
87 { TGT_MAP_EXECUTABLE, MAP_EXECUTABLE },
88 { TGT_MAP_FILE, MAP_FILE },
89 { TGT_MAP_GROWSDOWN, MAP_GROWSDOWN },
90 { TGT_MAP_HUGETLB, MAP_HUGETLB },
91 { TGT_MAP_LOCKED, MAP_LOCKED },
92 { TGT_MAP_NONBLOCK, MAP_NONBLOCK },
93 { TGT_MAP_NORESERVE, MAP_NORESERVE },
94 { TGT_MAP_POPULATE, MAP_POPULATE },
95 { TGT_MAP_STACK, MAP_STACK },
96 { TGT_MAP_ANONYMOUS, MAP_ANONYMOUS },
97 { TGT_MAP_FIXED, MAP_FIXED },
98};
99
100const unsigned SparcSolaris::NUM_MMAP_FLAGS =
101 sizeof(SparcSolaris::mmapFlagTable) /
102 sizeof(SparcSolaris::mmapFlagTable[0]);
103