diff -r 9f85c7d825cb -r 50d81070b1b4 src/cpu/base.hh --- a/src/cpu/base.hh Thu Sep 11 15:06:51 2014 +0100 +++ b/src/cpu/base.hh Thu Sep 11 15:07:27 2014 +0100 @@ -257,9 +257,6 @@ /// 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) {} diff -r 9f85c7d825cb -r 50d81070b1b4 src/cpu/inorder/inorder_dyn_inst.hh --- a/src/cpu/inorder/inorder_dyn_inst.hh Thu Sep 11 15:06:51 2014 +0100 +++ b/src/cpu/inorder/inorder_dyn_inst.hh Thu Sep 11 15:07:27 2014 +0100 @@ -533,13 +533,6 @@ //////////////////////////////////////////////////////////// // - // MULTITHREADING INTERFACE TO CPU MODELS - // - //////////////////////////////////////////////////////////// - virtual void deallocateContext(int thread_num); - - //////////////////////////////////////////////////////////// - // // PROGRAM COUNTERS - PC/NPC/NPC // //////////////////////////////////////////////////////////// diff -r 9f85c7d825cb -r 50d81070b1b4 src/cpu/inorder/inorder_dyn_inst.cc --- a/src/cpu/inorder/inorder_dyn_inst.cc Thu Sep 11 15:06:51 2014 +0100 +++ b/src/cpu/inorder/inorder_dyn_inst.cc Thu Sep 11 15:07:27 2014 +0100 @@ -571,12 +571,6 @@ } } -void -InOrderDynInst::deallocateContext(int thread_num) -{ - this->cpu->deallocateContext(thread_num); -} - Fault InOrderDynInst::readMem(Addr addr, uint8_t *data, unsigned size, unsigned flags) diff -r 9f85c7d825cb -r 50d81070b1b4 src/cpu/inorder/thread_context.hh --- a/src/cpu/inorder/thread_context.hh Thu Sep 11 15:06:51 2014 +0100 +++ b/src/cpu/inorder/thread_context.hh Thu Sep 11 15:07:27 2014 +0100 @@ -281,9 +281,6 @@ 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() diff -r 9f85c7d825cb -r 50d81070b1b4 src/cpu/o3/cpu.hh --- a/src/cpu/o3/cpu.hh Thu Sep 11 15:06:51 2014 +0100 +++ b/src/cpu/o3/cpu.hh Thu Sep 11 15:07:27 2014 +0100 @@ -326,11 +326,6 @@ 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 haltContext(ThreadID tid); diff -r 9f85c7d825cb -r 50d81070b1b4 src/cpu/o3/cpu.cc --- a/src/cpu/o3/cpu.cc Thu Sep 11 15:06:51 2014 +0100 +++ b/src/cpu/o3/cpu.cc Thu Sep 11 15:07:27 2014 +0100 @@ -730,20 +730,12 @@ template void -FullO3CPU::deallocateContext(ThreadID tid, bool remove) -{ - deactivateThread(tid); - if (remove) - removeThread(tid); -} - -template -void FullO3CPU::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) @@ -761,7 +753,9 @@ //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 diff -r 9f85c7d825cb -r 50d81070b1b4 src/cpu/simple/base.hh --- a/src/cpu/simple/base.hh Thu Sep 11 15:06:51 2014 +0100 +++ b/src/cpu/simple/base.hh Thu Sep 11 15:07:27 2014 +0100 @@ -170,7 +170,6 @@ void postExecute(); void advancePC(Fault fault); - virtual void deallocateContext(ThreadID thread_num); virtual void haltContext(ThreadID thread_num); // statistics diff -r 9f85c7d825cb -r 50d81070b1b4 src/cpu/simple/base.cc --- a/src/cpu/simple/base.cc Thu Sep 11 15:06:51 2014 +0100 +++ b/src/cpu/simple/base.cc Thu Sep 11 15:07:27 2014 +0100 @@ -133,14 +133,6 @@ } void -BaseSimpleCPU::deallocateContext(ThreadID thread_num) -{ - // for now, these are equivalent - suspendContext(thread_num); -} - - -void BaseSimpleCPU::haltContext(ThreadID thread_num) { // for now, these are equivalent