Mercurial > hg > Members > kono > Cerium
changeset 573:2f4b5ce2a515
example fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 23 Oct 2009 00:48:25 +0900 |
parents | 27a826cb2551 |
children | 6289230fe821 |
files | example/many_task/sort.cc example/renew_task/main.cc |
diffstat | 2 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/example/many_task/sort.cc Fri Oct 23 00:40:24 2009 +0900 +++ b/example/many_task/sort.cc Fri Oct 23 00:48:25 2009 +0900 @@ -1,4 +1,5 @@ #include "TaskManager.h" +#include "SchedTask.h" #include "sort.h" #include "Func.h" @@ -13,7 +14,7 @@ static int last_half_block_num; static TaskManager *manager; -static void sort_restart(void *); +static void sort_restart(SchedTask *, void *, void *); static void sort_start(); /** @@ -44,7 +45,7 @@ * @param d 生成された btask の数 */ static void -sort_restart(void *d) +sort_restart(SchedTask *s, void *d, void *e) { static int cnt = 0; int max = (int)d; @@ -111,7 +112,7 @@ for (int i = 0; i < half_num; i++) { bsort[i]->wait_for(fsort[i]); bsort[i]->wait_for(fsort[i+1]); - bsort[i]->set_post(sort_restart, (void*)(half_num)); + bsort[i]->set_post(sort_restart, (void*)(half_num),0); bsort[i]->spawn(); } }
--- a/example/renew_task/main.cc Fri Oct 23 00:40:24 2009 +0900 +++ b/example/renew_task/main.cc Fri Oct 23 00:48:25 2009 +0900 @@ -14,13 +14,13 @@ static int task_count = 1; static void -renewRepeat(void *arg) +renewRepeat(SchedTask *s, void *arg, void *d) { TaskManager *manager = (TaskManager *)arg; if (count-->0) { HTask *repeat = manager->create_task(RENEW_REPEAT); - repeat->set_post(renewRepeat, (void*)manager); + repeat->set_post(renewRepeat, (void*)manager, 0); repeat->spawn(); HTask *renew; @@ -69,7 +69,7 @@ printf("[PPE] Create Task : RenewRepeat\n\n"); repeat = manager->create_task(RENEW_REPEAT); - repeat->set_post(renewRepeat, (void*)manager); + repeat->set_post(renewRepeat, (void*)manager, 0); // add Active Queue repeat->spawn();