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/tru64 | |
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/tru64')
-rw-r--r-- | kern/tru64/tru64.hh | 66 |
1 files changed, 3 insertions, 63 deletions
diff --git a/kern/tru64/tru64.hh b/kern/tru64/tru64.hh index b4f45e650..ce9a67199 100644 --- a/kern/tru64/tru64.hh +++ b/kern/tru64/tru64.hh @@ -70,6 +70,8 @@ class Tru64 { public: + typedef TheISA::OSFlags OSFlags; + //@{ /// Basic Tru64 types. typedef uint64_t size_t; @@ -85,25 +87,6 @@ class Tru64 { typedef quad fsid_t; //@} - //@{ - /// open(2) flag values. - static const int TGT_O_RDONLY = 00000000; - static const int TGT_O_WRONLY = 00000001; - static const int TGT_O_RDWR = 00000002; - static const int TGT_O_NONBLOCK = 00000004; - static const int TGT_O_APPEND = 00000010; - static const int TGT_O_CREAT = 00001000; - static const int TGT_O_TRUNC = 00002000; - static const int TGT_O_EXCL = 00004000; - static const int TGT_O_NOCTTY = 00010000; - static const int TGT_O_SYNC = 00040000; - static const int TGT_O_DRD = 00100000; - static const int TGT_O_DIRECTIO = 00200000; - static const int TGT_O_CACHE = 00400000; - static const int TGT_O_DSYNC = 02000000; - static const int TGT_O_RSYNC = 04000000; - //@} - /// This table maps the target open() flags to the corresponding /// host open() flags. static OpenFlagTransTable openFlagTable[]; @@ -246,20 +229,6 @@ class Tru64 { char machine[_SYS_NMLN]; //!< Machine type. }; - //@{ - /// 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; - // TIOCGETS not defined in tru64, so I made up a number - static const unsigned TIOCGETS = 0x40000000; - static const unsigned TIOCGETA = 0x402c7413; - //@} - /// Resource enumeration for getrlimit(). enum rlimit_resources { TGT_RLIMIT_CPU = 0, @@ -280,21 +249,6 @@ class Tru64 { }; - /// For mmap(). - static const unsigned TGT_MAP_ANONYMOUS = 0x10; - - - //@{ - /// For getsysinfo(). - static const unsigned GSI_PLATFORM_NAME = 103; //!< platform name as string - static const unsigned GSI_CPU_INFO = 59; //!< CPU information - static const unsigned GSI_PROC_TYPE = 60; //!< get proc_type - static const unsigned GSI_MAX_CPU = 30; //!< max # cpu's on this machine - static const unsigned GSI_CPUS_IN_BOX = 55; //!< number of CPUs in system - static const unsigned GSI_PHYSMEM = 19; //!< Physical memory in KB - static const unsigned GSI_CLK_TCK = 42; //!< clock freq in Hz - //@} - /// For getsysinfo() GSI_CPU_INFO option. struct cpu_info { uint32_t current_cpu; //!< current_cpu @@ -309,24 +263,12 @@ class Tru64 { uint32_t unused[3]; //!< future expansion }; - //@{ - /// For setsysinfo(). - static const unsigned SSI_IEEE_FP_CONTROL = 14; //!< ieee_set_fp_control() - //@} - /// For gettimeofday. struct timeval { uint32_t tv_sec; //!< seconds uint32_t tv_usec; //!< microseconds }; - //@{ - /// For getrusage(). - static const int TGT_RUSAGE_THREAD = 1; - static const int TGT_RUSAGE_SELF = 0; - static const int TGT_RUSAGE_CHILDREN = -1; - //@} - /// For getrusage(). struct rusage { struct timeval ru_utime; //!< user time used @@ -372,8 +314,6 @@ class Tru64 { }; - /// For table(). - static const int TBL_SYSINFO = 12; /// For table(). struct tbl_sysinfo { @@ -759,7 +699,7 @@ class Tru64 { int lel = xc->getSyscallArg(4); // expected element size switch (id) { - case Tru64::TBL_SYSINFO: { + case Tru64::OSFlags::TBL_SYSINFO: { if (index != 0 || nel != 1 || lel != sizeof(Tru64::tbl_sysinfo)) return -EINVAL; TypedBufferArg<Tru64::tbl_sysinfo> elp(xc->getSyscallArg(2)); |