Mercurial > hg > Game > Cerium
diff example/word_count3/ppe/task_init.cc @ 508:217d7c53442b draft
add word_count3
author | yutaka@henri.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Tue, 20 Oct 2009 16:28:16 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/example/word_count3/ppe/task_init.cc Tue Oct 20 16:28:16 2009 +0900 @@ -0,0 +1,22 @@ +#include "Func.h" +#include "Scheduler.h" + +/* 必ずこの位置に書いて */ +SchedExternTask(Print); +SchedExternTask(Exec); +SchedExternTask(Hello); +SchedExternTask(Wait); + +/** + * この関数は ../spe/spe-main と違って + * 自分で呼び出せばいい関数なので + * 好きな関数名でおk (SchedRegisterTask は必須) + */ +void +task_init(void) +{ + SchedRegisterTask(PRINT_TASK, Print); + SchedRegisterTask(EXEC_TASK, Exec); + SchedRegisterTask(HELLO_TASK, Hello); + SchedRegisterTask(WAIT_TASK, Wait); +}