thread[tid]->lastActivate = curTick;
+ tcBase(tid)->setStatus(ThreadContext::Active);
+
wakeCPU();
}
}
removePipelineStalls(*thread_it);
- //@TODO: change stage status' to Idle?
-
activeThreads.erase(thread_it);
+
+ // Ideally, this should be triggered from the
+ // suspendContext/Thread functions
+ tcBase(tid)->setStatus(ThreadContext::Suspended);
}
assert(!isThreadActive(tid));
squashThreadInPipeline(tid);
haltedThreads.push_back(tid);
+ tcBase(tid)->setStatus(ThreadContext::Halted);
+
if (threadModel == SwitchOnCacheMiss) {
activateNextReadyContext();
}
deactivateThread(tid);
suspendedThreads.push_back(tid);
thread[tid]->lastSuspend = curTick;
+
+ tcBase(tid)->setStatus(ThreadContext::Suspended);
}
void
/** Pointer to the thread state that this TC corrseponds to. */
InOrderThreadState *thread;
-
/** Returns a pointer to the ITB. */
/** @TODO: PERF: Should we bind this to a pointer in constructor? */
TheISA::TLB *getITBPtr() { return cpu->getITBPtr(); }