Mercurial > hg > Game > CbCTaskManager
diff src/pthread/TaskManager.cbc @ 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 |
line wrap: on
line diff
--- 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. */