summaryrefslogtreecommitdiff
path: root/src/kern
diff options
context:
space:
mode:
authorBrandon Potter <brandon.potter@amd.com>2016-11-09 14:27:40 -0600
committerBrandon Potter <brandon.potter@amd.com>2016-11-09 14:27:40 -0600
commit3886c4a8f2e1bfe17cbf7a5a76ba0fc978c6bb48 (patch)
tree5a1ce6cbf42009fc9199c7ecfb068890ca74dbd4 /src/kern
parent7b6cf951e2f0fa70d6599f1e1d03f664b674a75e (diff)
downloadgem5-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/kern')
-rw-r--r--src/kern/freebsd/freebsd.hh2
-rw-r--r--src/kern/linux/linux.cc4
-rw-r--r--src/kern/linux/linux.hh5
-rw-r--r--src/kern/operatingsystem.cc2
-rw-r--r--src/kern/operatingsystem.hh5
5 files changed, 10 insertions, 8 deletions
diff --git a/src/kern/freebsd/freebsd.hh b/src/kern/freebsd/freebsd.hh
index e3d5cf5be..de5da9d3b 100644
--- a/src/kern/freebsd/freebsd.hh
+++ b/src/kern/freebsd/freebsd.hh
@@ -39,7 +39,7 @@
#include "kern/operatingsystem.hh"
class ThreadContext;
-class LiveProcess;
+class Process;
///
/// This class encapsulates the types, structures, constants,
diff --git a/src/kern/linux/linux.cc b/src/kern/linux/linux.cc
index 6618fdbd9..493be9611 100644
--- a/src/kern/linux/linux.cc
+++ b/src/kern/linux/linux.cc
@@ -38,7 +38,7 @@
#include "sim/system.hh"
int
-Linux::openSpecialFile(std::string path, LiveProcess *process,
+Linux::openSpecialFile(std::string path, Process *process,
ThreadContext *tc)
{
DPRINTF(SyscallVerbose, "Opening special file: %s\n", path.c_str());
@@ -59,7 +59,7 @@ Linux::openSpecialFile(std::string path, LiveProcess *process,
}
std::string
-Linux::procMeminfo(LiveProcess *process, ThreadContext *tc)
+Linux::procMeminfo(Process *process, ThreadContext *tc)
{
return csprintf("MemTotal:%12d kB\nMemFree: %12d kB\n",
process->system->memSize() >> 10,
diff --git a/src/kern/linux/linux.hh b/src/kern/linux/linux.hh
index 52a3bcd7b..e6899a9ca 100644
--- a/src/kern/linux/linux.hh
+++ b/src/kern/linux/linux.hh
@@ -223,8 +223,9 @@ class Linux : public OperatingSystem
int64_t ru_nivcsw; //!< involuntary "
};
- static int openSpecialFile(std::string path, LiveProcess *process, ThreadContext *tc);
- static std::string procMeminfo(LiveProcess *process, ThreadContext *tc);
+ static int openSpecialFile(std::string path, Process *process,
+ ThreadContext *tc);
+ static std::string procMeminfo(Process *process, ThreadContext *tc);
// For futex system call
static const unsigned TGT_FUTEX_WAIT = 0;
diff --git a/src/kern/operatingsystem.cc b/src/kern/operatingsystem.cc
index 1ecc94c15..553ceaf66 100644
--- a/src/kern/operatingsystem.cc
+++ b/src/kern/operatingsystem.cc
@@ -34,7 +34,7 @@
#include "base/misc.hh"
int
-OperatingSystem::openSpecialFile(std::string path, LiveProcess *process,
+OperatingSystem::openSpecialFile(std::string path, Process *process,
ThreadContext *tc)
{
warn("Attempting to open special file: %s. Ignoring. Simulation may"
diff --git a/src/kern/operatingsystem.hh b/src/kern/operatingsystem.hh
index 12aff946c..e097f6451 100644
--- a/src/kern/operatingsystem.hh
+++ b/src/kern/operatingsystem.hh
@@ -35,7 +35,7 @@
#include <string>
-class LiveProcess;
+class Process;
class ThreadContext;
/// This struct is used to build target-OS-dependent tables that
@@ -114,7 +114,8 @@ class OperatingSystem {
int64_t ru_nivcsw; //!< involuntary "
} rusage;
- static int openSpecialFile(std::string path, LiveProcess *process, ThreadContext *tc);
+ static int openSpecialFile(std::string path, Process *process,
+ ThreadContext *tc);
}; // class OperatingSystem