summaryrefslogtreecommitdiff
path: root/sim/process.cc
diff options
context:
space:
mode:
authorRon Dreslinski <rdreslin@umich.edu>2005-02-17 12:14:04 -0500
committerRon Dreslinski <rdreslin@umich.edu>2005-02-17 12:14:04 -0500
commit45ef238e3f54bd7e2b602def187085bd0b99aab5 (patch)
treeea4057df1dac0768ebf36201468af632cdefedf1 /sim/process.cc
parentb8d65408c810ba490243fc32c7d5e6817c32c70b (diff)
parentcfe6ed7c484b62d07bae23c528f0e2e568cf0d65 (diff)
downloadgem5-45ef238e3f54bd7e2b602def187085bd0b99aab5.tar.xz
Merge zizzer:/z/m5/Bitkeeper/m5
into zizzer.eecs.umich.edu:/.automount/zazzer/z/rdreslin/m5bk/timing_L1 --HG-- extra : convert_revision : 88afcacc41f5b0fae0ed1ac1821b7ca88c407e85
Diffstat (limited to 'sim/process.cc')
-rw-r--r--sim/process.cc23
1 files changed, 14 insertions, 9 deletions
diff --git a/sim/process.cc b/sim/process.cc
index c725d3b1c..4d860c51d 100644
--- a/sim/process.cc
+++ b/sim/process.cc
@@ -88,8 +88,6 @@ Process::Process(const string &name,
fd_map[i] = -1;
}
- num_syscalls = 0;
-
// other parameters will be initialized when the program is loaded
}
@@ -145,21 +143,28 @@ Process::registerExecContext(ExecContext *xc)
execContexts.push_back(xc);
if (myIndex == 0) {
- // first exec context for this process... initialize & enable
-
// copy process's initial regs struct
xc->regs = *init_regs;
-
- // mark this context as active.
- // activate with zero delay so that we start ticking right
- // away on cycle 0
- xc->activate(0);
}
// return CPU number to caller and increment available CPU count
return myIndex;
}
+void
+Process::startup()
+{
+ if (execContexts.empty())
+ return;
+
+ // first exec context for this process... initialize & enable
+ ExecContext *xc = execContexts[0];
+
+ // mark this context as active.
+ // activate with zero delay so that we start ticking right
+ // away on cycle 0
+ xc->activate(0);
+}
void
Process::replaceExecContext(ExecContext *xc, int xcIndex)