changeset 1082:cfabe454e7cc draft

cpu 0 never terminates
author tkaito@henri
date Fri, 17 Dec 2010 12:24:29 +0900
parents 4a5498c98e34
children 54cf940e124a
files TaskManager/Cell/CellTaskManagerImpl.cc TaskManager/Fifo/FifoTaskManagerImpl.cc TaskManager/Fifo/FifoTaskManagerImpl.h
diffstat 3 files changed, 20 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/TaskManager/Cell/CellTaskManagerImpl.cc	Fri Dec 17 11:47:40 2010 +0900
+++ b/TaskManager/Cell/CellTaskManagerImpl.cc	Fri Dec 17 12:24:29 2010 +0900
@@ -161,7 +161,11 @@
 void
 CellTaskManagerImpl::run()
 {
-int spu_limit = spuIdle;
+    int spu_limit = spuIdle;
+    if (machineNum==0) {
+       ppeManager->run();
+       return;
+    }
     do {
         // PPE side
 	ppeManager->poll();
--- a/TaskManager/Fifo/FifoTaskManagerImpl.cc	Fri Dec 17 11:47:40 2010 +0900
+++ b/TaskManager/Fifo/FifoTaskManagerImpl.cc	Fri Dec 17 12:24:29 2010 +0900
@@ -121,7 +121,6 @@
     }
 }
 
-
 /**
  *  called from CellTaskManagerImpl
  */
@@ -139,14 +138,23 @@
  *  single CPU run
  */
 void
+FifoTaskManagerImpl::poll1()
+{
+    set_runTaskList1(activeTaskQueue);
+    // list を実行する
+    sendTaskList();
+    // ppe scheduler からの mail を調べる
+    mail_check();
+}
+
+/**
+ *  single CPU run
+ */
+void
 FifoTaskManagerImpl::run()
 {
     do {
-	set_runTaskList1(activeTaskQueue);
-	// list を実行する
-	sendTaskList();
-	// ppe scheduler からの mail を調べる
-	mail_check();
+	poll1();
     } while(!activeTaskQueue->empty()) ;
 
     if (!waitTaskQueue->empty()) {
--- a/TaskManager/Fifo/FifoTaskManagerImpl.h	Fri Dec 17 11:47:40 2010 +0900
+++ b/TaskManager/Fifo/FifoTaskManagerImpl.h	Fri Dec 17 12:24:29 2010 +0900
@@ -24,6 +24,7 @@
     void init(int spuIdle);
     void init(MainScheduler*, TaskManagerImpl*);
     void poll();  // called from CellTaskManagerImpl
+    void poll1();  // single CPU run called from CellTaskManagerImpl
     void run();
     void show_profile()  {};
     void start_profile()  {};