summaryrefslogtreecommitdiff
path: root/sim/process.cc
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2005-03-09 15:52:10 -0500
committerAli Saidi <saidi@eecs.umich.edu>2005-03-09 15:52:10 -0500
commit232134a8169e35931a34140c57dc7a8dfb4b1546 (patch)
treec178f1b301ee284d81522ecc14ac40f927a0df13 /sim/process.cc
parent761d104f7b5771ad7c854a6e6474c30ce55e217e (diff)
downloadgem5-232134a8169e35931a34140c57dc7a8dfb4b1546.tar.xz
Changed all syscalls to use syscall return object.
arch/alpha/alpha_linux_process.cc: arch/alpha/alpha_tru64_process.cc: cpu/exec_context.hh: sim/process.hh: sim/syscall_emul.cc: sim/syscall_emul.hh: Changed all syscalls to use syscall return object arch/alpha/isa_traits.hh: Added syscall return object that packages return value and return status into an object. sim/process.cc: renamed variable name to nm so base class function name() can be called --HG-- extra : convert_revision : 6609c5ffecc9e3519d7a0cd160879fd21d54abfc
Diffstat (limited to 'sim/process.cc')
-rw-r--r--sim/process.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/sim/process.cc b/sim/process.cc
index acc6762f8..7111e8733 100644
--- a/sim/process.cc
+++ b/sim/process.cc
@@ -65,14 +65,14 @@ using namespace std;
// current number of allocated processes
int num_processes = 0;
-Process::Process(const string &name,
+Process::Process(const string &nm,
int stdin_fd, // initial I/O descriptors
int stdout_fd,
int stderr_fd)
- : SimObject(name)
+ : SimObject(nm)
{
// allocate memory space
- memory = new MainMemory(name + ".MainMem");
+ memory = new MainMemory(nm + ".MainMem");
// allocate initial register file
init_regs = new RegFile;
@@ -88,6 +88,7 @@ Process::Process(const string &name,
fd_map[i] = -1;
}
+ mmap_start = mmap_end = 0;
// other parameters will be initialized when the program is loaded
}
@@ -252,10 +253,10 @@ copyStringArray(vector<string> &strings, Addr array_ptr, Addr data_ptr,
memory->access(Write, array_ptr, &data_ptr, sizeof(Addr));
}
-LiveProcess::LiveProcess(const string &name, ObjectFile *objFile,
+LiveProcess::LiveProcess(const string &nm, ObjectFile *objFile,
int stdin_fd, int stdout_fd, int stderr_fd,
vector<string> &argv, vector<string> &envp)
- : Process(name, stdin_fd, stdout_fd, stderr_fd)
+ : Process(nm, stdin_fd, stdout_fd, stderr_fd)
{
prog_fname = argv[0];
@@ -339,7 +340,7 @@ LiveProcess::LiveProcess(const string &name, ObjectFile *objFile,
LiveProcess *
-LiveProcess::create(const string &name,
+LiveProcess::create(const string &nm,
int stdin_fd, int stdout_fd, int stderr_fd,
vector<string> &argv, vector<string> &envp)
{
@@ -353,13 +354,13 @@ LiveProcess::create(const string &name,
if (objFile->getArch() == ObjectFile::Alpha) {
switch (objFile->getOpSys()) {
case ObjectFile::Tru64:
- process = new AlphaTru64Process(name, objFile,
+ process = new AlphaTru64Process(nm, objFile,
stdin_fd, stdout_fd, stderr_fd,
argv, envp);
break;
case ObjectFile::Linux:
- process = new AlphaLinuxProcess(name, objFile,
+ process = new AlphaLinuxProcess(nm, objFile,
stdin_fd, stdout_fd, stderr_fd,
argv, envp);
break;