Mercurial > hg > Game > Cerium
annotate TaskManager/kernel/ppe/HTask.h @ 480:75e4afa40da2 draft
TaskQueueInfo initiaization...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 05 Oct 2009 12:24:07 +0900 |
parents | bf2d2625485e |
children | bce667ff20b9 |
rev | line source |
---|---|
109 | 1 #ifndef INCLUDED_HTASK |
2 #define INCLUDED_HTASK | |
3 | |
307 | 4 #include "base.h" |
5 #include "types.h" | |
6 #include "Task.h" | |
7 #include "TaskQueueInfo.h" | |
109 | 8 |
479
bf2d2625485e
Double Linked List base TaskQueue
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
397
diff
changeset
|
9 class TaskQueueInfo; |
109 | 10 class TaskManagerImpl; |
11 | |
293 | 12 /*! |
13 @class | |
14 | |
15 @brief | |
16 | |
17 Cerium の Task で、spawn() でキューに格納されて順次実行される。 | |
18 cpu の指定があれば並列に実行される。 | |
19 特定の Task を待ち合わせる事が可能。 | |
20 Task の入出力は dma などで copy される。 | |
21 */ | |
22 | |
109 | 23 class HTask : public Task { |
24 public: | |
25 BASE_NEW_DELETE(HTask); | |
26 | |
479
bf2d2625485e
Double Linked List base TaskQueue
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
397
diff
changeset
|
27 TaskQueueInfo *wait_me; // List of task waiting for me |
bf2d2625485e
Double Linked List base TaskQueue
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
397
diff
changeset
|
28 TaskQueueInfo *wait_i; // List of task for which I am waiting |
397
ce86b0186a4a
delete manager (in kernel/ppe/TaskManager.h)
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
366
diff
changeset
|
29 void (*post_func)(void *arg); |
109 | 30 void *post_arg; |
31 CPU_TYPE cpu_type; | |
480
75e4afa40da2
TaskQueueInfo initiaization...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
479
diff
changeset
|
32 HTask *next; // free list 用 |
109 | 33 TaskManagerImpl *mimpl; |
34 | |
35 void spawn(void); | |
293 | 36 void wait_for(HTask *); |
397
ce86b0186a4a
delete manager (in kernel/ppe/TaskManager.h)
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
366
diff
changeset
|
37 void set_cpu(CPU_TYPE type); |
109 | 38 void set_post(void (*func)(void *), void *arg); |
39 }; | |
40 | |
41 typedef HTask* HTaskPtr; | |
42 | |
43 #endif |