/// Notify the CPU that the indicated context is now suspended.
virtual void suspendContext(ThreadID thread_num) {}
- /// Notify the CPU that the indicated context is now deallocated.
- virtual void deallocateContext(ThreadID thread_num) {}
-
/// Notify the CPU that the indicated context is now halted.
virtual void haltContext(ThreadID thread_num) {}
}
}
-void
-InOrderDynInst::deallocateContext(int thread_num)
-{
- this->cpu->deallocateContext(thread_num);
-}
-
Fault
InOrderDynInst::readMem(Addr addr, uint8_t *data,
unsigned size, unsigned flags)
/** Emulates a syscall. */
void syscall(int64_t callnum);
- ////////////////////////////////////////////////////////////
- //
- // MULTITHREADING INTERFACE TO CPU MODELS
- //
- ////////////////////////////////////////////////////////////
- virtual void deallocateContext(int thread_num);
-
////////////////////////////////////////////////////////////
//
// PROGRAM COUNTERS - PC/NPC/NPC
void activateContext()
{ cpu->activateContext(thread->threadId()); }
- void deallocateContext()
- { cpu->deallocateContext(thread->threadId()); }
-
/** Returns the number of consecutive store conditional failures. */
// @todo: Figure out where these store cond failures should go.
unsigned readStCondFailures()
}
}
-template <class Impl>
-void
-FullO3CPU<Impl>::deallocateContext(ThreadID tid, bool remove)
-{
- deactivateThread(tid);
- if (remove)
- removeThread(tid);
-}
-
template <class Impl>
void
FullO3CPU<Impl>::suspendContext(ThreadID tid)
{
DPRINTF(O3CPU,"[tid: %i]: Suspending Thread Context.\n", tid);
assert(!switchedOut());
- deallocateContext(tid, false);
+
+ deactivateThread(tid);
// If this was the last thread then unschedule the tick event.
if (activeThreads.size() == 0)
//For now, this is the same as deallocate
DPRINTF(O3CPU,"[tid:%i]: Halt Context called. Deallocating", tid);
assert(!switchedOut());
- deallocateContext(tid, true);
+
+ deactivateThread(tid);
+ removeThread(tid);
}
template <class Impl>
/** Remove Thread from Active Threads List */
void suspendContext(ThreadID tid);
- /** Remove Thread from Active Threads List &&
- * Possibly Remove Thread Context from CPU.
- */
- void deallocateContext(ThreadID tid, bool remove);
-
/** Remove Thread from Active Threads List &&
* Remove Thread Context from CPU.
*/
{
}
-void
-BaseSimpleCPU::deallocateContext(ThreadID thread_num)
-{
- // for now, these are equivalent
- suspendContext(thread_num);
-}
-
-
void
BaseSimpleCPU::haltContext(ThreadID thread_num)
{
void postExecute();
void advancePC(const Fault &fault);
- virtual void deallocateContext(ThreadID thread_num);
virtual void haltContext(ThreadID thread_num);
// statistics