Mercurial > hg > Game > Cerium
annotate TaskManager/kernel/ppe/HTask.h @ 498:bce667ff20b9 draft
double linked HTaskInfo/HTask
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 11 Oct 2009 11:46:41 +0900 |
parents | 75e4afa40da2 |
children | 981aa2f89a80 |
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 |
9 class TaskManagerImpl; | |
10 | |
293 | 11 /*! |
12 @class | |
13 | |
14 @brief | |
15 | |
16 Cerium の Task で、spawn() でキューに格納されて順次実行される。 | |
17 cpu の指定があれば並列に実行される。 | |
18 特定の Task を待ち合わせる事が可能。 | |
19 Task の入出力は dma などで copy される。 | |
20 */ | |
21 | |
109 | 22 class HTask : public Task { |
23 public: | |
24 BASE_NEW_DELETE(HTask); | |
25 | |
479
bf2d2625485e
Double Linked List base TaskQueue
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
397
diff
changeset
|
26 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
|
27 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
|
28 void (*post_func)(void *arg); |
109 | 29 void *post_arg; |
30 CPU_TYPE cpu_type; | |
31 TaskManagerImpl *mimpl; | |
32 | |
498
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
480
diff
changeset
|
33 Task *task; |
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
480
diff
changeset
|
34 HTask *waiter; |
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
480
diff
changeset
|
35 HTask *next; |
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
480
diff
changeset
|
36 HTask *prev; |
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
480
diff
changeset
|
37 |
109 | 38 void spawn(void); |
293 | 39 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
|
40 void set_cpu(CPU_TYPE type); |
109 | 41 void set_post(void (*func)(void *), void *arg); |
42 }; | |
43 | |
44 typedef HTask* HTaskPtr; | |
45 | |
46 #endif |