Mercurial > hg > Members > kono > Cerium
annotate TaskManager/kernel/ppe/HTask.h @ 641:0692b08f1cd6
Regression on Mac OS X
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 21 Nov 2009 10:06:34 +0900 |
parents | 0558abba673c |
children | 14d179ff1e9f |
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; | |
507 | 10 class SchedTask; |
11 | |
519 | 12 typedef void (*PostFunction)(SchedTask *s, void *read, void *write); |
109 | 13 |
293 | 14 /*! |
15 @class | |
16 | |
17 @brief | |
18 | |
19 Cerium の Task で、spawn() でキューに格納されて順次実行される。 | |
20 cpu の指定があれば並列に実行される。 | |
21 特定の Task を待ち合わせる事が可能。 | |
22 Task の入出力は dma などで copy される。 | |
23 */ | |
634 | 24 #ifdef SIPMLE_TASK |
641
0692b08f1cd6
Regression on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
634
diff
changeset
|
25 class HTask : public SimpleTask { |
634 | 26 #else |
641
0692b08f1cd6
Regression on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
634
diff
changeset
|
27 class HTask : public Task { |
634 | 28 #endif |
109 | 29 public: |
30 BASE_NEW_DELETE(HTask); | |
31 | |
479
5bda98b0b56d
Double Linked List base TaskQueue
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
397
diff
changeset
|
32 TaskQueueInfo *wait_me; // List of task waiting for me |
5bda98b0b56d
Double Linked List base TaskQueue
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
397
diff
changeset
|
33 TaskQueueInfo *wait_i; // List of task for which I am waiting |
518 | 34 PostFunction post_func; |
507 | 35 void *post_arg1; |
36 void *post_arg2; | |
109 | 37 CPU_TYPE cpu_type; |
38 TaskManagerImpl *mimpl; | |
39 | |
498
cb5ecfc5aaa3
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
480
diff
changeset
|
40 HTask *waiter; |
cb5ecfc5aaa3
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
480
diff
changeset
|
41 HTask *next; |
cb5ecfc5aaa3
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
480
diff
changeset
|
42 HTask *prev; |
cb5ecfc5aaa3
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
480
diff
changeset
|
43 |
109 | 44 void spawn(void); |
293 | 45 void wait_for(HTask *); |
397
a4f690f44842
delete manager (in kernel/ppe/TaskManager.h)
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
366
diff
changeset
|
46 void set_cpu(CPU_TYPE type); |
507 | 47 void set_post(PostFunction func, void *read, void *write); |
109 | 48 }; |
49 | |
50 typedef HTask* HTaskPtr; | |
51 | |
52 #endif |