From 8882dc1283771463a20194c083f4b8940a2d574b Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Wed, 15 Apr 2009 13:13:47 -0700 Subject: 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. --- src/cpu/simple_thread.cc | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/cpu/simple_thread.cc') diff --git a/src/cpu/simple_thread.cc b/src/cpu/simple_thread.cc index 6ede3f429..73b23f89a 100644 --- a/src/cpu/simple_thread.cc +++ b/src/cpu/simple_thread.cc @@ -152,7 +152,7 @@ SimpleThread::takeOverFrom(ThreadContext *oldContext) storeCondFailures = 0; - oldContext->setStatus(ThreadContext::Unallocated); + oldContext->setStatus(ThreadContext::Halted); } void @@ -253,15 +253,6 @@ SimpleThread::suspend() cpu->suspendContext(_threadId); } -void -SimpleThread::deallocate() -{ - if (status() == ThreadContext::Unallocated) - return; - - _status = ThreadContext::Unallocated; - cpu->deallocateContext(_threadId); -} void SimpleThread::halt() -- cgit v1.2.3