gem5
|
#include <iostream>
#include <string>
#include "arch/registers.hh"
#include "arch/types.hh"
#include "base/types.hh"
#include "config/the_isa.hh"
Go to the source code of this file.
Classes | |
class | ThreadContext |
ThreadContext is the external interface to all thread state for anything outside of the CPU. More... | |
class | ProxyThreadContext< TC > |
ProxyThreadContext class that provides a way to implement a ThreadContext without having to derive from it. More... | |
Namespaces | |
TheISA | |
TheISA::Kernel | |
Functions | |
void | takeOverFrom (ThreadContext &new_tc, ThreadContext &old_tc) |
Copy state between thread contexts in preparation for CPU handover. More... | |
void | serialize (ThreadContext &tc, CheckpointOut &cp) |
Thread context serialization helpers. More... | |
void | unserialize (ThreadContext &tc, CheckpointIn &cp) |
void serialize | ( | ThreadContext & | tc, |
CheckpointOut & | cp | ||
) |
Thread context serialization helpers.
These helper functions provide a way to the data in a ThreadContext. They are provided as separate helper function since implementing them as members of the ThreadContext interface would be confusing when the ThreadContext is exported via a proxy.
Definition at line 144 of file thread_context.cc.
References arrayParamOut(), ArmISA::i, AlphaISA::NumCCRegs, AlphaISA::NumFloatRegs, AlphaISA::NumIntRegs, ThreadContext::pcState(), ThreadContext::readCCRegFlat(), ThreadContext::readFloatRegBitsFlat(), ThreadContext::readIntRegFlat(), and SERIALIZE_ARRAY.
void takeOverFrom | ( | ThreadContext & | new_tc, |
ThreadContext & | old_tc | ||
) |
Copy state between thread contexts in preparation for CPU handover.
new_tc | Destination ThreadContext. |
old_tc | Source ThreadContext. |
Definition at line 204 of file thread_context.cc.
References ThreadContext::contextId(), ThreadContext::copyArchRegs(), FullSystem, ThreadContext::getCpuPtr(), ThreadContext::getProcessPtr(), ThreadContext::getQuiesceEvent(), ThreadContext::getSystemPtr(), ThreadContext::Halted, ThreadContext::setContextId(), ThreadContext::setStatus(), ThreadContext::setThreadId(), ThreadContext::status(), and ThreadContext::threadId().
Referenced by BaseKvmCPU::takeOverFrom(), O3ThreadContext< class >::takeOverFrom(), MinorCPU::takeOverFrom(), AtomicSimpleCPU::takeOverFrom(), TimingSimpleCPU::takeOverFrom(), and FullO3CPU< Impl >::takeOverFrom().
void unserialize | ( | ThreadContext & | tc, |
CheckpointIn & | cp | ||
) |
Definition at line 173 of file thread_context.cc.
References arrayParamIn(), ArmISA::i, AlphaISA::NumCCRegs, AlphaISA::NumFloatRegs, AlphaISA::NumIntRegs, ThreadContext::pcState(), ThreadContext::setCCRegFlat(), ThreadContext::setFloatRegBitsFlat(), ThreadContext::setIntRegFlat(), and UNSERIALIZE_ARRAY.