linux.cc (11382:654272b82e94) linux.cc (11383:5ac090acd180)
1/*
2 * Copyright (c) 2006 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: Korey Sewell
29 */
30
1/*
2 * Copyright (c) 2006 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: Korey Sewell
29 */
30
31#include <fcntl.h>
32
33#include "arch/mips/linux/linux.hh"
34
31#include "arch/mips/linux/linux.hh"
32
33#include <fcntl.h>
34#include <sys/mman.h>
35
35// open(2) flags translation table
36SyscallFlagTransTable MipsLinux::openFlagTable[] = {
37#ifdef _MSC_VER
38 { MipsLinux::TGT_O_RDONLY, _O_RDONLY },
39 { MipsLinux::TGT_O_WRONLY, _O_WRONLY },
40 { MipsLinux::TGT_O_RDWR, _O_RDWR },
41 { MipsLinux::TGT_O_CREAT, _O_CREAT },
42 { MipsLinux::TGT_O_EXCL, _O_EXCL },

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

92#ifdef O_PATH
93 { MipsLinux::TGT_O_PATH, O_PATH },
94#endif
95#endif /* _MSC_VER */
96};
97
98const int MipsLinux::NUM_OPEN_FLAGS =
99 (sizeof(MipsLinux::openFlagTable)/sizeof(MipsLinux::openFlagTable[0]));
36// open(2) flags translation table
37SyscallFlagTransTable MipsLinux::openFlagTable[] = {
38#ifdef _MSC_VER
39 { MipsLinux::TGT_O_RDONLY, _O_RDONLY },
40 { MipsLinux::TGT_O_WRONLY, _O_WRONLY },
41 { MipsLinux::TGT_O_RDWR, _O_RDWR },
42 { MipsLinux::TGT_O_CREAT, _O_CREAT },
43 { MipsLinux::TGT_O_EXCL, _O_EXCL },

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

93#ifdef O_PATH
94 { MipsLinux::TGT_O_PATH, O_PATH },
95#endif
96#endif /* _MSC_VER */
97};
98
99const int MipsLinux::NUM_OPEN_FLAGS =
100 (sizeof(MipsLinux::openFlagTable)/sizeof(MipsLinux::openFlagTable[0]));
101
102// mmap(2) flags translation table
103SyscallFlagTransTable MipsLinux::mmapFlagTable[] = {
104 { MipsLinux::TGT_MAP_SHARED, MAP_SHARED },
105 { MipsLinux::TGT_MAP_PRIVATE, MAP_PRIVATE },
106 { MipsLinux::TGT_MAP_ANON, MAP_ANON },
107 { MipsLinux::TGT_MAP_DENYWRITE, MAP_DENYWRITE },
108 { MipsLinux::TGT_MAP_EXECUTABLE, MAP_EXECUTABLE },
109 { MipsLinux::TGT_MAP_FILE, MAP_FILE },
110 { MipsLinux::TGT_MAP_GROWSDOWN, MAP_GROWSDOWN },
111 { MipsLinux::TGT_MAP_HUGETLB, MAP_HUGETLB },
112 { MipsLinux::TGT_MAP_LOCKED, MAP_LOCKED },
113 { MipsLinux::TGT_MAP_NONBLOCK, MAP_NONBLOCK },
114 { MipsLinux::TGT_MAP_NORESERVE, MAP_NORESERVE },
115 { MipsLinux::TGT_MAP_POPULATE, MAP_POPULATE },
116#ifdef MAP_STACK
117 { MipsLinux::TGT_MAP_STACK, MAP_STACK },
118#endif
119 { MipsLinux::TGT_MAP_ANONYMOUS, MAP_ANONYMOUS },
120 { MipsLinux::TGT_MAP_FIXED, MAP_FIXED },
121};
122
123const unsigned MipsLinux::NUM_MMAP_FLAGS =
124 sizeof(MipsLinux::mmapFlagTable) /
125 sizeof(MipsLinux::mmapFlagTable[0]);
126