diff options
author | Steve Reinhardt <steve.reinhardt@amd.com> | 2009-04-15 13:13:47 -0700 |
---|---|---|
committer | Steve Reinhardt <steve.reinhardt@amd.com> | 2009-04-15 13:13:47 -0700 |
commit | 8882dc1283771463a20194c083f4b8940a2d574b (patch) | |
tree | d33aa3b7b59a4a466d43643e0b8bc64acc66e951 /src/cpu/o3/thread_context_impl.hh | |
parent | 9b66e8289781025bbc4d0e152737fa7c5d024ec8 (diff) | |
download | gem5-8882dc1283771463a20194c083f4b8940a2d574b.tar.xz |
Get rid of the Unallocated thread context state.
Basically merge it in with Halted.
Also had to get rid of a few other functions that
called ThreadContext::deallocate(), including:
- InOrderCPU's setThreadRescheduleCondition.
- ThreadContext::exit(). This function was there to avoid terminating
simulation when one thread out of a multi-thread workload exits, but we
need to find a better (non-cpu-centric) way.
Diffstat (limited to 'src/cpu/o3/thread_context_impl.hh')
-rwxr-xr-x | src/cpu/o3/thread_context_impl.hh | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/cpu/o3/thread_context_impl.hh b/src/cpu/o3/thread_context_impl.hh index fc8b66b83..07140a19f 100755 --- a/src/cpu/o3/thread_context_impl.hh +++ b/src/cpu/o3/thread_context_impl.hh @@ -84,7 +84,7 @@ O3ThreadContext<Impl>::takeOverFrom(ThreadContext *old_context) cpu->lockFlag = false; #endif - old_context->setStatus(ThreadContext::Unallocated); + old_context->setStatus(ThreadContext::Halted); thread->inSyscall = false; thread->trapPending = false; @@ -104,11 +104,6 @@ O3ThreadContext<Impl>::activate(int delay) thread->lastActivate = curTick; #endif - if (thread->status() == ThreadContext::Unallocated) { - cpu->activateWhenReady(thread->threadId()); - return; - } - thread->setStatus(ThreadContext::Active); // status() == Suspended @@ -144,20 +139,6 @@ O3ThreadContext<Impl>::suspend(int delay) template <class Impl> void -O3ThreadContext<Impl>::deallocate(int delay) -{ - DPRINTF(O3CPU, "Calling deallocate on Thread Context %d delay %d\n", - threadId(), delay); - - if (thread->status() == ThreadContext::Unallocated) - return; - - thread->setStatus(ThreadContext::Unallocated); - cpu->deallocateContext(thread->threadId(), true, delay); -} - -template <class Impl> -void O3ThreadContext<Impl>::halt(int delay) { DPRINTF(O3CPU, "Calling halt on Thread Context %d\n", |