diff options
Diffstat (limited to 'src/sim')
-rw-r--r-- | src/sim/process.cc | 6 | ||||
-rw-r--r-- | src/sim/process.hh | 2 | ||||
-rw-r--r-- | src/sim/system.cc | 8 |
3 files changed, 13 insertions, 3 deletions
diff --git a/src/sim/process.cc b/src/sim/process.cc index c5be4087d..01155ae32 100644 --- a/src/sim/process.cc +++ b/src/sim/process.cc @@ -85,7 +85,7 @@ using namespace TheISA; int num_processes = 0; Process::Process(ProcessParams * params) - : SimObject(params), system(params->system), + : SimObject(params), system(params->system), checkpointRestored(false), max_stack_size(params->max_stack_size) { string in = params->input; @@ -335,6 +335,10 @@ Process::unserialize(Checkpoint *cp, const std::string §ion) UNSERIALIZE_ARRAY(fd_map, MAX_FD); pTable->unserialize(cp, section); + + + checkpointRestored = true; + } diff --git a/src/sim/process.hh b/src/sim/process.hh index d43208c27..0d2db959c 100644 --- a/src/sim/process.hh +++ b/src/sim/process.hh @@ -74,6 +74,8 @@ class Process : public SimObject // created threads and are not initialized. bool initialContextLoaded; + bool checkpointRestored; + // thread contexts associated with this process std::vector<ThreadContext *> threadContexts; diff --git a/src/sim/system.cc b/src/sim/system.cc index 41c1b94e3..7dc1d2ba9 100644 --- a/src/sim/system.cc +++ b/src/sim/system.cc @@ -240,7 +240,9 @@ System::serialize(ostream &os) { #if FULL_SYSTEM kernelSymtab->serialize("kernel_symtab", os); -#endif // FULL_SYSTEM +#else // !FULL_SYSTEM + SERIALIZE_SCALAR(page_ptr); +#endif } @@ -249,7 +251,9 @@ System::unserialize(Checkpoint *cp, const string §ion) { #if FULL_SYSTEM kernelSymtab->unserialize("kernel_symtab", cp, section); -#endif // FULL_SYSTEM +#else // !FULL_SYSTEM + UNSERIALIZE_SCALAR(page_ptr); +#endif } void |