linux.cc (11382:654272b82e94) | linux.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: Gabe Black 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: Gabe Black 29 */ 30 |
31#include <fcntl.h> 32 | |
33#include "arch/sparc/linux/linux.hh" 34 | 31#include "arch/sparc/linux/linux.hh" 32 |
33#include <fcntl.h> 34#include <sys/mman.h> 35 |
|
35// open(2) flags translation table 36SyscallFlagTransTable SparcLinux::openFlagTable[] = { 37#ifdef _MSC_VER 38 { SparcLinux::TGT_O_RDONLY, _O_RDONLY }, 39 { SparcLinux::TGT_O_WRONLY, _O_WRONLY }, 40 { SparcLinux::TGT_O_RDWR, _O_RDWR }, 41 { SparcLinux::TGT_O_CREAT, _O_CREAT }, 42 { SparcLinux::TGT_O_EXCL, _O_EXCL }, --- 47 unchanged lines hidden (view full) --- 90 { SparcLinux::TGT_O_PATH, O_PATH }, 91#endif 92#endif /* _MSC_VER */ 93}; 94 95const int SparcLinux::NUM_OPEN_FLAGS = 96 (sizeof(SparcLinux::openFlagTable)/sizeof(SparcLinux::openFlagTable[0])); 97 | 36// open(2) flags translation table 37SyscallFlagTransTable SparcLinux::openFlagTable[] = { 38#ifdef _MSC_VER 39 { SparcLinux::TGT_O_RDONLY, _O_RDONLY }, 40 { SparcLinux::TGT_O_WRONLY, _O_WRONLY }, 41 { SparcLinux::TGT_O_RDWR, _O_RDWR }, 42 { SparcLinux::TGT_O_CREAT, _O_CREAT }, 43 { SparcLinux::TGT_O_EXCL, _O_EXCL }, --- 47 unchanged lines hidden (view full) --- 91 { SparcLinux::TGT_O_PATH, O_PATH }, 92#endif 93#endif /* _MSC_VER */ 94}; 95 96const int SparcLinux::NUM_OPEN_FLAGS = 97 (sizeof(SparcLinux::openFlagTable)/sizeof(SparcLinux::openFlagTable[0])); 98 |
99// mmap(2) flags translation table 100SyscallFlagTransTable SparcLinux::mmapFlagTable[] = { 101 { SparcLinux::TGT_MAP_SHARED, MAP_SHARED }, 102 { SparcLinux::TGT_MAP_PRIVATE, MAP_PRIVATE }, 103 { SparcLinux::TGT_MAP_ANON, MAP_ANON }, 104 { SparcLinux::TGT_MAP_DENYWRITE, MAP_DENYWRITE }, 105 { SparcLinux::TGT_MAP_EXECUTABLE, MAP_EXECUTABLE }, 106 { SparcLinux::TGT_MAP_FILE, MAP_FILE }, 107 { SparcLinux::TGT_MAP_GROWSDOWN, MAP_GROWSDOWN }, 108 { SparcLinux::TGT_MAP_HUGETLB, MAP_HUGETLB }, 109 { SparcLinux::TGT_MAP_LOCKED, MAP_LOCKED }, 110 { SparcLinux::TGT_MAP_NONBLOCK, MAP_NONBLOCK }, 111 { SparcLinux::TGT_MAP_NORESERVE, MAP_NORESERVE }, 112 { SparcLinux::TGT_MAP_POPULATE, MAP_POPULATE }, 113#ifdef MAP_STACK 114 { SparcLinux::TGT_MAP_STACK, MAP_STACK }, 115#endif 116 { SparcLinux::TGT_MAP_ANONYMOUS, MAP_ANONYMOUS }, 117 { SparcLinux::TGT_MAP_FIXED, MAP_FIXED }, 118#ifdef MAP_INHERIT 119 { SparcLinux::TGT_MAP_INHERIT, MAP_INHERIT }, 120#endif 121 { SparcLinux::TGT_MAP_POPULATE, MAP_POPULATE }, 122}; 123 124const unsigned SparcLinux::NUM_MMAP_FLAGS = 125 sizeof(SparcLinux::mmapFlagTable) / 126 sizeof(SparcLinux::mmapFlagTable[0]); 127 |
|