diff options
author | Brandon Potter <brandon.potter@amd.com> | 2016-11-09 14:27:40 -0600 |
---|---|---|
committer | Brandon Potter <brandon.potter@amd.com> | 2016-11-09 14:27:40 -0600 |
commit | 3886c4a8f2e1bfe17cbf7a5a76ba0fc978c6bb48 (patch) | |
tree | 5a1ce6cbf42009fc9199c7ecfb068890ca74dbd4 /src/arch/sparc/linux | |
parent | 7b6cf951e2f0fa70d6599f1e1d03f664b674a75e (diff) | |
download | gem5-3886c4a8f2e1bfe17cbf7a5a76ba0fc978c6bb48.tar.xz |
syscall_emul: [patch 5/22] remove LiveProcess class and use Process instead
The EIOProcess class was removed recently and it was the only other class
which derived from Process. Since every Process invocation is also a
LiveProcess invocation, it makes sense to simplify the organization by
combining the fields from LiveProcess into Process.
Diffstat (limited to 'src/arch/sparc/linux')
-rw-r--r-- | src/arch/sparc/linux/process.cc | 12 | ||||
-rw-r--r-- | src/arch/sparc/linux/process.hh | 10 | ||||
-rw-r--r-- | src/arch/sparc/linux/syscalls.cc | 8 |
3 files changed, 15 insertions, 15 deletions
diff --git a/src/arch/sparc/linux/process.cc b/src/arch/sparc/linux/process.cc index a95498ea0..0f72c69c7 100644 --- a/src/arch/sparc/linux/process.cc +++ b/src/arch/sparc/linux/process.cc @@ -60,9 +60,9 @@ SparcLinuxProcess::getDesc32(int callnum) return &syscall32Descs[callnum]; } -Sparc32LinuxProcess::Sparc32LinuxProcess(LiveProcessParams * params, +Sparc32LinuxProcess::Sparc32LinuxProcess(ProcessParams * params, ObjectFile *objFile) - : Sparc32LiveProcess(params, objFile) + : Sparc32Process(params, objFile) {} void Sparc32LinuxProcess::handleTrap(int trapNum, ThreadContext *tc) @@ -72,13 +72,13 @@ void Sparc32LinuxProcess::handleTrap(int trapNum, ThreadContext *tc) tc->syscall(tc->readIntReg(1)); break; default: - SparcLiveProcess::handleTrap(trapNum, tc); + SparcProcess::handleTrap(trapNum, tc); } } -Sparc64LinuxProcess::Sparc64LinuxProcess(LiveProcessParams * params, +Sparc64LinuxProcess::Sparc64LinuxProcess(ProcessParams * params, ObjectFile *objFile) - : Sparc64LiveProcess(params, objFile) + : Sparc64Process(params, objFile) {} void Sparc64LinuxProcess::handleTrap(int trapNum, ThreadContext *tc) @@ -89,6 +89,6 @@ void Sparc64LinuxProcess::handleTrap(int trapNum, ThreadContext *tc) tc->syscall(tc->readIntReg(1)); break; default: - SparcLiveProcess::handleTrap(trapNum, tc); + SparcProcess::handleTrap(trapNum, tc); } } diff --git a/src/arch/sparc/linux/process.hh b/src/arch/sparc/linux/process.hh index 022b1176d..1c38576fd 100644 --- a/src/arch/sparc/linux/process.hh +++ b/src/arch/sparc/linux/process.hh @@ -58,11 +58,11 @@ class SparcLinuxProcess }; /// A process with emulated SPARC/Linux syscalls. -class Sparc32LinuxProcess : public SparcLinuxProcess, public Sparc32LiveProcess +class Sparc32LinuxProcess : public SparcLinuxProcess, public Sparc32Process { public: /// Constructor. - Sparc32LinuxProcess(LiveProcessParams * params, ObjectFile *objFile); + Sparc32LinuxProcess(ProcessParams * params, ObjectFile *objFile); SyscallDesc* getDesc(int callnum) @@ -74,11 +74,11 @@ class Sparc32LinuxProcess : public SparcLinuxProcess, public Sparc32LiveProcess }; /// A process with emulated 32 bit SPARC/Linux syscalls. -class Sparc64LinuxProcess : public SparcLinuxProcess, public Sparc64LiveProcess +class Sparc64LinuxProcess : public SparcLinuxProcess, public Sparc64Process { public: /// Constructor. - Sparc64LinuxProcess(LiveProcessParams * params, ObjectFile *objFile); + Sparc64LinuxProcess(ProcessParams * params, ObjectFile *objFile); SyscallDesc* getDesc(int callnum) @@ -90,7 +90,7 @@ class Sparc64LinuxProcess : public SparcLinuxProcess, public Sparc64LiveProcess }; SyscallReturn getresuidFunc(SyscallDesc *desc, int num, - LiveProcess *p, ThreadContext *tc); + Process *p, ThreadContext *tc); } // namespace SparcISA #endif // __SPARC_LINUX_PROCESS_HH__ diff --git a/src/arch/sparc/linux/syscalls.cc b/src/arch/sparc/linux/syscalls.cc index 33140f1b8..6825b2abb 100644 --- a/src/arch/sparc/linux/syscalls.cc +++ b/src/arch/sparc/linux/syscalls.cc @@ -32,15 +32,15 @@ #include "sim/syscall_desc.hh" #include "sim/syscall_emul.hh" -class LiveProcess; +class Process; class ThreadContext; namespace SparcISA { /// Target uname() handler. static SyscallReturn -unameFunc(SyscallDesc *desc, int callnum, LiveProcess *process, - ThreadContext *tc) +unameFunc(SyscallDesc *desc, int callnum, Process *process, + ThreadContext *tc) { int index = 0; TypedBufferArg<Linux::utsname> name(process->getSyscallArg(tc, index)); @@ -58,7 +58,7 @@ unameFunc(SyscallDesc *desc, int callnum, LiveProcess *process, SyscallReturn -getresuidFunc(SyscallDesc *desc, int num, LiveProcess *p, ThreadContext *tc) +getresuidFunc(SyscallDesc *desc, int num, Process *p, ThreadContext *tc) { const IntReg id = htog(100); int index = 0; |