linux.cc (11382:654272b82e94) | linux.cc (11383:5ac090acd180) |
---|---|
1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * Copyright (c) 2009 The University of Edinburgh 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * 29 * Authors: Timothy M. Jones 30 */ 31 | 1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * Copyright (c) 2009 The University of Edinburgh 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * 29 * Authors: Timothy M. Jones 30 */ 31 |
32#include <fcntl.h> 33 | |
34#include "arch/power/linux/linux.hh" 35 | 32#include "arch/power/linux/linux.hh" 33 |
34#include <fcntl.h> 35#include <sys/mman.h> 36 |
|
36// open(2) flags translation table 37SyscallFlagTransTable PowerLinux::openFlagTable[] = { 38#ifdef _MSC_VER 39 { PowerLinux::TGT_O_RDONLY, _O_RDONLY }, 40 { PowerLinux::TGT_O_WRONLY, _O_WRONLY }, 41 { PowerLinux::TGT_O_RDWR, _O_RDWR }, 42 { PowerLinux::TGT_O_CREAT, _O_CREAT }, 43 { PowerLinux::TGT_O_EXCL, _O_EXCL }, --- 56 unchanged lines hidden (view full) --- 100 { PowerLinux::TGT_O_PATH, O_PATH}, 101#endif 102#endif /* _MSC_VER */ 103}; 104 105const int PowerLinux::NUM_OPEN_FLAGS = 106 (sizeof(PowerLinux::openFlagTable)/sizeof(PowerLinux::openFlagTable[0])); 107 | 37// open(2) flags translation table 38SyscallFlagTransTable PowerLinux::openFlagTable[] = { 39#ifdef _MSC_VER 40 { PowerLinux::TGT_O_RDONLY, _O_RDONLY }, 41 { PowerLinux::TGT_O_WRONLY, _O_WRONLY }, 42 { PowerLinux::TGT_O_RDWR, _O_RDWR }, 43 { PowerLinux::TGT_O_CREAT, _O_CREAT }, 44 { PowerLinux::TGT_O_EXCL, _O_EXCL }, --- 56 unchanged lines hidden (view full) --- 101 { PowerLinux::TGT_O_PATH, O_PATH}, 102#endif 103#endif /* _MSC_VER */ 104}; 105 106const int PowerLinux::NUM_OPEN_FLAGS = 107 (sizeof(PowerLinux::openFlagTable)/sizeof(PowerLinux::openFlagTable[0])); 108 |
109// mmap(2) flags translation table 110SyscallFlagTransTable PowerLinux::mmapFlagTable[] = { 111 { PowerLinux::TGT_MAP_SHARED, MAP_SHARED }, 112 { PowerLinux::TGT_MAP_PRIVATE, MAP_PRIVATE }, 113 { PowerLinux::TGT_MAP_ANON, MAP_ANON }, 114 { PowerLinux::TGT_MAP_DENYWRITE, MAP_DENYWRITE }, 115 { PowerLinux::TGT_MAP_EXECUTABLE, MAP_EXECUTABLE }, 116 { PowerLinux::TGT_MAP_FILE, MAP_FILE }, 117 { PowerLinux::TGT_MAP_GROWSDOWN, MAP_GROWSDOWN }, 118 { PowerLinux::TGT_MAP_HUGETLB, MAP_HUGETLB }, 119 { PowerLinux::TGT_MAP_LOCKED, MAP_LOCKED }, 120 { PowerLinux::TGT_MAP_NONBLOCK, MAP_NONBLOCK }, 121 { PowerLinux::TGT_MAP_NORESERVE, MAP_NORESERVE }, 122 { PowerLinux::TGT_MAP_POPULATE, MAP_POPULATE }, 123#ifdef MAP_STACK 124 { PowerLinux::TGT_MAP_STACK, MAP_STACK }, 125#endif 126 { PowerLinux::TGT_MAP_ANONYMOUS, MAP_ANONYMOUS }, 127 { PowerLinux::TGT_MAP_FIXED, MAP_FIXED }, 128}; 129 130const unsigned PowerLinux::NUM_MMAP_FLAGS = 131 sizeof(PowerLinux::mmapFlagTable) / 132 sizeof(PowerLinux::mmapFlagTable[0]); 133 |
|