changeset 831:65e9eab53f50

CheckTaskList Mail working
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 25 May 2010 17:48:39 +0900
parents c7905ead974f
children 29094b48d966 ca2dc60a6f16
files TaskManager/kernel/ppe/TaskManagerImpl.cc
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/TaskManager/kernel/ppe/TaskManagerImpl.cc	Tue May 25 17:28:05 2010 +0900
+++ b/TaskManager/kernel/ppe/TaskManagerImpl.cc	Tue May 25 17:48:39 2010 +0900
@@ -179,11 +179,11 @@
 TaskManagerImpl::check_task_list_finish(SchedTask *s, TaskListPtr list, HTaskInfo *wait_queue)
 {
     for(int i = 0;i<list->length;i++) {
-	SimpleTaskPtr task = &list->tasks[list->length++];
+	SimpleTaskPtr task = &list->tasks[i];
 	HTask *me = (HTask*)task->self;
 	me->post_func(s, me->post_arg1, me->post_arg2);
 	if (task->command==TaskArray1) {
-	    int next = (task->r_size)/sizeof(SimpleTask);
+	    int next = ((task->r_size)/sizeof(SimpleTask))+1;
 	    // assert(next<list->length);
 	    i+=next;
 	}
@@ -235,7 +235,7 @@
 	}
 	memcpy(array, htask->rbuf, htask->r_size);
 	free(htask->rbuf);
-	htask->rbuf = 0; htask->r_size = 0;
+	// htask->rbuf = 0; htask->r_size = 0; we need this...
 	*task = *(SimpleTask*)htask;
     } else {
 	*task = *(SimpleTask*)htask;