diff options
author | Korey Sewell <ksewell@umich.edu> | 2006-04-12 03:44:45 -0400 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2006-04-12 03:44:45 -0400 |
commit | 4fe89f7232202040b8b8fcea2461e5ae6be2d739 (patch) | |
tree | 71d4f25c95264ac9e9d47bb624cb4d8ddadbe078 /kern/linux | |
parent | da7990ab337699ae788809ddaea5ba5c363e0015 (diff) | |
download | gem5-4fe89f7232202040b8b8fcea2461e5ae6be2d739.tar.xz |
add OSFlags struct to AlphaISA/MipsISA namespace. The OS classes then use these OSFlags to access architecture-specific AND OS-specific
flags for their functions (e.g. OS::OSFlags::TG_MAP_ANONYMOUS)...
arch/alpha/tru64/process.cc:
sim/syscall_emul.hh:
Add OSFlags to code
arch/mips/isa/decoder.isa:
slight decoder changes (more stylistic then anything)
arch/mips/isa/formats/util.isa:
spacing
arch/mips/isa_traits.hh:
add OSFlags struct to MipsISA namespace. The OS classes then use these OSFlags to access architecture-specific and OS-specific
flags for their functions
kern/linux/linux.hh:
remove constant placement ... define OSFlags in linux.hh
kern/tru64/tru64.hh:
define OSFlags in tru64
--HG--
extra : convert_revision : 59be1036eb439ca4ea1eea1d3b52e508023de6c9
Diffstat (limited to 'kern/linux')
-rw-r--r-- | kern/linux/linux.hh | 45 |
1 files changed, 3 insertions, 42 deletions
diff --git a/kern/linux/linux.hh b/kern/linux/linux.hh index 9237084fc..93d92a85b 100644 --- a/kern/linux/linux.hh +++ b/kern/linux/linux.hh @@ -45,6 +45,7 @@ class Linux {}; #include <unistd.h> #include "sim/syscall_emul.hh" +#include "arch/isa_traits.hh" class TranslatingPort; @@ -66,6 +67,8 @@ class Linux { typedef uint32_t gid_t; //@} + typedef TheISA::OSFlags OSFlags; + #if BSD_HOST typedef struct stat hst_stat; typedef struct stat hst_stat64; @@ -75,25 +78,6 @@ class Linux { #endif - //@{ - /// open(2) flag values. - static const int TGT_O_RDONLY = 00000000; //!< O_RDONLY - static const int TGT_O_WRONLY = 00000001; //!< O_WRONLY - static const int TGT_O_RDWR = 00000002; //!< O_RDWR - static const int TGT_O_NONBLOCK = 00000004; //!< O_NONBLOCK - static const int TGT_O_APPEND = 00000010; //!< O_APPEND - static const int TGT_O_CREAT = 00001000; //!< O_CREAT - static const int TGT_O_TRUNC = 00002000; //!< O_TRUNC - static const int TGT_O_EXCL = 00004000; //!< O_EXCL - static const int TGT_O_NOCTTY = 00010000; //!< O_NOCTTY - static const int TGT_O_SYNC = 00040000; //!< O_SYNC - static const int TGT_O_DRD = 00100000; //!< O_DRD - static const int TGT_O_DIRECTIO = 00200000; //!< O_DIRECTIO - static const int TGT_O_CACHE = 00400000; //!< O_CACHE - static const int TGT_O_DSYNC = 02000000; //!< O_DSYNC - static const int TGT_O_RSYNC = 04000000; //!< O_RSYNC - //@} - /// This table maps the target open() flags to the corresponding /// host open() flags. static OpenFlagTransTable openFlagTable[]; @@ -159,19 +143,6 @@ class Linux { }; - //@{ - /// ioctl() command codes. - static const unsigned TIOCGETP = 0x40067408; - static const unsigned TIOCSETP = 0x80067409; - static const unsigned TIOCSETN = 0x8006740a; - static const unsigned TIOCSETC = 0x80067411; - static const unsigned TIOCGETC = 0x40067412; - static const unsigned FIONREAD = 0x4004667f; - static const unsigned TIOCISATTY = 0x2000745e; - static const unsigned TIOCGETS = 0x402c7413; - static const unsigned TIOCGETA = 0x40127417; - //@} - /// Resource enumeration for getrlimit(). enum rlimit_resources { TGT_RLIMIT_CPU = 0, @@ -194,10 +165,6 @@ class Linux { uint64_t rlim_max; //!< hard limit }; - - /// For mmap(). - static const unsigned TGT_MAP_ANONYMOUS = 0x10; - /// For gettimeofday(). struct timeval { int64_t tv_sec; //!< seconds @@ -210,12 +177,6 @@ class Linux { uint64_t iov_len; }; - //@{ - /// For getrusage(). - static const int TGT_RUSAGE_SELF = 0; - static const int TGT_RUSAGE_CHILDREN = -1; - static const int TGT_RUSAGE_BOTH = -2; - //@} /// For getrusage(). struct rusage { |