changeset 15:2e764a0ae8ff

bit modify.
author kent <kent@cr.ie.u-ryukyu.ac.jp>
date Sat, 09 Jan 2010 18:48:57 +0900
parents 5f65da34f4f3
children e89acebd97b1
files src/Fifo/TaskManager.h src/pthread/TaskManager.cbc
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/Fifo/TaskManager.h	Sat Jan 09 18:13:49 2010 +0900
+++ b/src/Fifo/TaskManager.h	Sat Jan 09 18:48:57 2010 +0900
@@ -3,7 +3,6 @@
 #include <stdlib.h>
 #include "List.h"
 #include "Task.h"
-#include "interface.h"
 
 typedef struct _SchedTask {
 	Task *task;
--- a/src/pthread/TaskManager.cbc	Sat Jan 09 18:13:49 2010 +0900
+++ b/src/pthread/TaskManager.cbc	Sat Jan 09 18:48:57 2010 +0900
@@ -179,9 +179,12 @@
 	/* schedulerd  */
 	if ( nextcode==NULL ) {
 		/* the task finished.  */
+		Task *task;
+		task = manager->running->task;
 		manager->schedTasks =
 			_listRemove(manager->schedTasks, manager->running);
-		queueOffer(manager->finishtaskQ, manager->running);
+		free(manager->running);
+		queueOffer(manager->finishtaskQ, task);
 		goto selectCode(manager);
 	} else {
 		/* save the next code segment for the task.  */