diff options
author | Mitch Hayenga <mitch.hayenga@arm.com> | 2014-09-20 17:18:36 -0400 |
---|---|---|
committer | Mitch Hayenga <mitch.hayenga@arm.com> | 2014-09-20 17:18:36 -0400 |
commit | cc6523e2d686447f90acccac20c0fb2940dc3e3b (patch) | |
tree | 1db59dcca74fcc7f5fbebf76c06831a438c2990a /src/cpu/o3 | |
parent | e1403fc2af61c224c573c47c77a36f9b1b78e7df (diff) | |
download | gem5-cc6523e2d686447f90acccac20c0fb2940dc3e3b.tar.xz |
cpu: Remove unused deallocateContext calls
The call paths for de-scheduling a thread are halt() and suspend(), from
the thread context. There is no call to deallocateContext() in general,
though some CPUs chose to define it. This patch removes the function
from BaseCPU and the cores which do not require it.
Diffstat (limited to 'src/cpu/o3')
-rw-r--r-- | src/cpu/o3/cpu.cc | 16 | ||||
-rw-r--r-- | src/cpu/o3/cpu.hh | 5 |
2 files changed, 5 insertions, 16 deletions
diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc index 2ae185532..7ed3944cf 100644 --- a/src/cpu/o3/cpu.cc +++ b/src/cpu/o3/cpu.cc @@ -730,20 +730,12 @@ FullO3CPU<Impl>::activateContext(ThreadID tid) 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) @@ -761,7 +753,9 @@ FullO3CPU<Impl>::haltContext(ThreadID tid) //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> diff --git a/src/cpu/o3/cpu.hh b/src/cpu/o3/cpu.hh index 0fd08a68b..c263790ce 100644 --- a/src/cpu/o3/cpu.hh +++ b/src/cpu/o3/cpu.hh @@ -326,11 +326,6 @@ class FullO3CPU : public BaseO3CPU 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); |