changeset 1906:24b3a107f83f draft

fix mail check loop for IO thread
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 16 Jan 2014 18:46:52 +0900
parents e8ccf8fa7bf7
children df397764c51e
files TaskManager/Cell/CellTaskManagerImpl.cc
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/TaskManager/Cell/CellTaskManagerImpl.cc	Thu Jan 16 18:39:17 2014 +0900
+++ b/TaskManager/Cell/CellTaskManagerImpl.cc	Thu Jan 16 18:46:52 2014 +0900
@@ -151,7 +151,7 @@
 }
 
 void CellTaskManagerImpl::sendTaskList() {
-    for (int id = 0; id < machineNum; id++) {
+    for (int id = 0; id < machineNum+ioNum; id++) {
         mail_check(id);
         if (!speTaskList[id]->empty()) {
             continue; // まだ、走ってる
@@ -252,7 +252,7 @@
         printf("\n");
     }
     get_scheduler()-> printf("   spe queue %d\n", activeTaskQueue->length());
-    for (int i = 0; i < machineNum; i++) {
+    for (int i = 0; i < machineNum+ioNum; i++) {
         get_scheduler()-> printf("   spe %d send %d wait %d\n", i,
                                  speTaskList[i]->length(), taskListInfo[i]->length());
     }
@@ -260,6 +260,7 @@
 
 /**
  * SPE からのメールをチェックする
+ *     check_mail
  */
 
 void CellTaskManagerImpl::mail_check(int id) {
@@ -301,7 +302,7 @@
 void CellTaskManagerImpl::polling() {
     // may  call recursively check_task_list_finish()
     // we need fifo here
-    for (int i = 0; i < machineNum; i++) {
+    for (int i = 0; i < machineNum+ioNum; i++) {
         mail_check(i);
     }
 }