Fixes for splash, may conflict with Korey's SMT work and doesn't support 03cpu yet.
authorRon Dreslinski <rdreslin@umich.edu>
Mon, 16 Apr 2007 15:31:54 +0000 (11:31 -0400)
committerRon Dreslinski <rdreslin@umich.edu>
Mon, 16 Apr 2007 15:31:54 +0000 (11:31 -0400)
src/cpu/simple/base.cc:
    Cpu's should start as unallocated, not suspended
src/cpu/simple_thread.cc:
    Wait for a thread to be assigned to activate the cpu
src/kern/tru64/tru64.hh:
    When looking for a open cpu to assign threads, look for an unallocated one, not a suspended one.

--HG--
extra : convert_revision : 5e3ad2e96b4a715ed38293ceaccff5b9f4ea7985

src/cpu/simple/base.cc
src/cpu/simple_thread.cc
src/kern/tru64/tru64.hh

index 877dc5bd494cb9a1204f1ea996ef7c6fd3e12016..4fed2059ba1df93c0d0a0b62f2762051204df3da 100644 (file)
@@ -79,7 +79,7 @@ BaseSimpleCPU::BaseSimpleCPU(Params *p)
             /* asid */ 0);
 #endif // !FULL_SYSTEM
 
-    thread->setStatus(ThreadContext::Suspended);
+    thread->setStatus(ThreadContext::Unallocated);
 
     tc = thread->getTC();
 
index 39f31782b09520aec5639e044d258a5e97480d55..191ae2f2e671500aeb47a5d6f882fa44c8024e56 100644 (file)
@@ -221,10 +221,10 @@ SimpleThread::activate(int delay)
 
     lastActivate = curTick;
 
-    if (status() == ThreadContext::Unallocated) {
-        cpu->activateWhenReady(tid);
-        return;
-    }
+//    if (status() == ThreadContext::Unallocated) {
+//     cpu->activateWhenReady(tid);
+//     return;
+//   }
 
     _status = ThreadContext::Active;
 
index b94276035f665463af6c2fc902e61373b817da5c..a7703be7c1a5e04cdf3bc40172abbeed6d918c62 100644 (file)
@@ -792,7 +792,7 @@ class Tru64 : public OperatingSystem
             for (int i = 0; i < process->numCpus(); ++i) {
                 ThreadContext *tc = process->threadContexts[i];
 
-                if (tc->status() == ThreadContext::Suspended) {
+                if (tc->status() == ThreadContext::Unallocated) {
                     // inactive context... grab it
                     init_thread_context(tc, attrp, uniq_val);