annotate example/README @ 116:f5588c39fd7b draft

fix
author gongo@charles.cr.ie.u-ryukyu.ac.jp
date Thu, 13 Nov 2008 10:49:23 +0900
parents d9ea79aac04f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
1 /**
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
2 * 現在開発中なので、仕様やここに書いてる事も
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
3 * すごい頻度で変わる可能性があります。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
4 * なので、定期的に cvs update をしたり
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
5 * Game_project/Cerium/TaskManager/Changelog を見たり
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
6 * http://www.cr.ie.u-ryukyu.ac.jp/~game/pukiwiki/ を見てください。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
7 */
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
8
116
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 115
diff changeset
9
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
10 Cerium の例題っぽいのを置いてあります。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
11 ここにある書き方を参考に他にいろいろ作ってみてください。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
12
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
13 例題の概要は、各ディレクトリの README に書いてあります。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
14 使用方法や実行例も同じです。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
15
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
16 -----------------
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
17 最近の更新
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
18 -----------------
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
19
115
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
20 2008/11/13
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
21
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
22 Makefile.macosx において、
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
23 `sdl-config --libs` を追加してあります。
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
24 例題の中で SDL を使うことはなくても書かれているのは、
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
25 ライブラリ側に main() を置いたためです。
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
26
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
27 http://d.hatena.ne.jp/hiratara/20080719/1216481600
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
28
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
29 上を見てもらえばわかると思いますが、
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
30 SDL では、ユーザが描いた main を SDL_main に置き換え、
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
31 libSDL の中の main() を起動時のエントリに使ってます。
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
32 なので、TaskManager/kernel/main.cc では #include <SDL.h> とか
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
33 やってますが、そのせいで、ユーザ側でも sdl-config --libs をしないと
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
34 「main() がないぞ」ってなリンカエラーが出るわけです。
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
35 これは、MacOSX だけの問題で、Linux や PS3 上では問題ないので
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
36 Makefile.macosx だけに記述しています。
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
37
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
38 なので、MacOSX 上で例題を動かす場合、一瞬 SDL のウインドウが
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
39 起動する系の動作をすると思いますが、無視してください。それ以外は動きますので。
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
40
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
41 いずれはちゃんと切り分けたいところですが、今のところこんな感じで。
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
42
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
43
d9ea79aac04f fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
44
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
45 2008/11/01
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
46
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
47 main 関数はライブラリに閉じました。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
48 というわけで、ユーザ側の main() は
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
49
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
50 int cerium_main(int argc, char *argv[]);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
51
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
52 となります。引数は通常の main と同じものが渡されます
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
53 cerium_main で ( < 0 ) を返す (例えば -1) と
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
54 プログラムが終了するようにしています。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
55 cerium_main を正常に抜けると、ライブラリ側で
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
56 main loop が回り、全タスク終了と共にプログラムが終了します。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
57
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
58 あと、Cerium の標準オプションとして
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
59
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
60 -chelp Print this message
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
61 -cpu Number of CPU (default 1)
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
62
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
63 を実装しました。近々増やしていく予定です。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
64
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
65 TaskManager へのアクセスですが、今までは
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
66
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
67 TaskManager *manager = new TaskManager(CPU_NUM);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
68
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
69 とかやってたはずですが、現在はライブラリ側で生成しているので、
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
70 TaskManager.h を include すると、中で
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
71
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
72 extern TaskManager *manager;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
73
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
74 とかしてるので、そのまま manager->create_task とかして使えます。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
75
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
76
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
77
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
78 -----------------
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
79 修正場所
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
80 -----------------
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
81
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
82 今のところ、configure とかそういうのは無いので、
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
83 ライブラリのパスは手動で書き直さないといけないです。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
84 各例題の Makefile.def ってところに、
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
85
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
86 TARGET = 例題の実行ファイル名
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
87 CERIUM = Cerium のパス
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
88
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
89 を書くところがあるので、自分の環境にあう感じで書いてください。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
90
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
91 -----------------
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
92 コンパイル方法
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
93 -----------------
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
94 MacOSX
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
95 % make macosx
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
96
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
97 Linux
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
98 % make linux
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
99
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
100 PS3 (spe/ 以下もコンパイルされます)
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
101 % make ps3
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
102
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
103
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
104 clean するときは普通に
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
105
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
106 % make clean でいいです。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
107
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
108
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
110 --------------------
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
111 プログラムの書き方
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
112 --------------------
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
113
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
114 まだちゃんと仕様書みたいなものをは書いてないので、
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
115 ここで記述必須の所を書いておきます。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
116
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
117 1. タスクの作り方
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
118 2. タスクの登録 (ID との対応付け)
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
119 3. 最後に
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
120
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
121 -------------------
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
122 1. タスクの作り方
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
123 -------------------
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
124
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
125 タスクは、一つのクラスとして扱います。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
126 クラスの宣言 (.h) はこんな感じです。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
127
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
128 ++++++++++++++++++++++++++++++++++
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
129 #ifndef INCLUDED_SCHED_TASK
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
130 # include "SchedTask.h"
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
131 #endif
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
132
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
133 class Hello : public SchedTask {
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
134 public:
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
135 SchedConstructor(Hello);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
136
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
137 int run(void *r, void *w);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
138 };
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
139 ++++++++++++++++++++++++++++++++++
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
140
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
141 以上の記述は必須です。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
142 クラス名と、SchedConstructor() の中身は一緒にしてください。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
143 run() がこのクラスの Task としての実装となります。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
144 クラス変数、関数を加えるのはOKです。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
145
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
146
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
147 次に実装 (.cc) です。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
148
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
149 ++++++++++++++++++++++++++++++++++
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
150 #include "Hello.h"
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
151
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
152 /* これは必須 */
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
153 SchedDefineTask(Hello);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
154
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
155 int
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
156 Hello::run(void *rbuf, void *wbuf)
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
157 {
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
158 printf("Hello, World!!\n");
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
159
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
160 return 0;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
161 }
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
162 ++++++++++++++++++++++++++++++++++
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
163
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
164 SchedDefineTask にもクラス名を入れてください。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
165 rbuf, wbuf とかの使い方は 各例題を見ればわかります(basic とか)。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
166
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
167
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
168
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
169 -------------------
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
170 2 タスクの登録
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
171 -------------------
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
172
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
173 タスクは ID で管理するようにしています。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
174 ppe で動くタスクは ppe/ 以下の task_init.cc で書きます。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
175
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
176 ++++++++++++++++++++++++
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
177 #include "Func.h"
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
178 #include "Scheduler.h"
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
179
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
180 /* 必ずこの位置に書いて */
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
181 SchedExternTask(Hello);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
182
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
183 void
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
184 task_init(void)
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
185 {
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
186 SchedRegisterTask(HELLO_TASK, Hello);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
187 }
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
188 ++++++++++++++++++++++++
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
189
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
190 SchedExternTask と SchedRegisterTask は必須です。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
191 RegisterTask では、クラス名の他に、対応する ID を入れてください。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
192 ID は 整数で、現在は 0〜31 まで設定できます。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
193 上の場合は、Func.h で HELLO_TASK を enum でやってます。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
194
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
195 SPE で動かすタスクも、spe/spe-main.cc に書いてください。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
196 書き方は ppe と同じです。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
197
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
198
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
199 -------------------
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
200 3. 最後に
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
201 -------------------
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
202 「もう書く事ねーのかよ」って意見もあるかもしれない。すまん。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
203 一番上にあるように、まだまだ開発の初期っつーかなんつーか、なので
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
204 これからどんどん追加していきますので。