annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
508
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
1 #include "Func.h"
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
2 #include "Scheduler.h"
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
3
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
4 /* 必ずこの位置に書いて */
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
5 SchedExternTask(Print);
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
6 SchedExternTask(Exec);
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
7 SchedExternTask(Hello);
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
8 SchedExternTask(Wait);
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
9
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
10 /**
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
11 * この関数は ../spe/spe-main と違って
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
12 * 自分で呼び出せばいい関数なので
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
13 * 好きな関数名でおk (SchedRegisterTask は必須)
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
14 */
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
15 void
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
16 task_init(void)
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
17 {
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
18 SchedRegisterTask(PRINT_TASK, Print);
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
19 SchedRegisterTask(EXEC_TASK, Exec);
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
20 SchedRegisterTask(HELLO_TASK, Hello);
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
21 SchedRegisterTask(WAIT_TASK, Wait);
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
22 }