From 4fe89f7232202040b8b8fcea2461e5ae6be2d739 Mon Sep 17 00:00:00 2001 From: Korey Sewell Date: Wed, 12 Apr 2006 03:44:45 -0400 Subject: 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 --- sim/syscall_emul.hh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'sim') diff --git a/sim/syscall_emul.hh b/sim/syscall_emul.hh index 58db2469e..bab29ca6a 100644 --- a/sim/syscall_emul.hh +++ b/sim/syscall_emul.hh @@ -348,14 +348,14 @@ ioctlFunc(SyscallDesc *desc, int callnum, Process *process, } switch (req) { - case OS::TIOCISATTY: - case OS::TIOCGETP: - case OS::TIOCSETP: - case OS::TIOCSETN: - case OS::TIOCSETC: - case OS::TIOCGETC: - case OS::TIOCGETS: - case OS::TIOCGETA: + case OS::OSFlags::TIOCISATTY: + case OS::OSFlags::TIOCGETP: + case OS::OSFlags::TIOCSETP: + case OS::OSFlags::TIOCSETN: + case OS::OSFlags::TIOCSETC: + case OS::OSFlags::TIOCGETC: + case OS::OSFlags::TIOCGETS: + case OS::OSFlags::TIOCGETA: return -ENOTTY; default: @@ -719,7 +719,7 @@ mmapFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc) p->pTable->allocate(start, length); p->mmap_end += length; - if (!(flags & OS::TGT_MAP_ANONYMOUS)) { + if (!(flags & OS::OSFlags::TGT_MAP_ANONYMOUS)) { warn("allowing mmap of file @ fd %d. " "This will break if not /dev/zero.", xc->getSyscallArg(4)); } @@ -810,7 +810,7 @@ getrusageFunc(SyscallDesc *desc, int callnum, Process *process, int who = xc->getSyscallArg(0); // THREAD, SELF, or CHILDREN TypedBufferArg rup(xc->getSyscallArg(1)); - if (who != OS::TGT_RUSAGE_SELF) { + if (who != OS::OSFlags::TGT_RUSAGE_SELF) { // don't really handle THREAD or CHILDREN, but just warn and // plow ahead warn("getrusage() only supports RUSAGE_SELF. Parameter %d ignored.", -- cgit v1.2.3