Mercurial > hg > Game > Cerium
annotate TaskManager/kernel/ppe/HTaskInfo.h @ 634:62e570ac5db2 draft
SimpleTask start
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 18 Nov 2009 17:29:14 +0900 |
parents | 7ddbe22d4cdb |
children | aba1600e8f83 |
rev | line source |
---|---|
46 | 1 #ifndef INCLUDED_HTASK_INFO |
2 #define INCLUDED_HTASK_INFO | |
3 | |
498
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
4 #include "Task.h" |
307 | 5 #include "HTask.h" |
46 | 6 |
498
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
7 class HTaskInfo : public HTask { |
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
8 |
46 | 9 public: |
10 /* constructor */ | |
498
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
11 HTaskInfo(); |
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
12 |
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
13 BASE_NEW_DELETE(HTaskInfo); |
46 | 14 |
15 /* functions */ | |
501
7ddbe22d4cdb
Cell inData/outData DMA removal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
499
diff
changeset
|
16 HTaskPtr create(int cmd); |
634 | 17 HTaskPtr create(int cmd, void *rbuf, int rs, void *wbuf, int ws); |
498
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
18 |
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
19 void free_(HTaskPtr queue); |
46 | 20 |
498
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
21 void addFirst(HTask* e); |
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
22 void addLast(HTask* e); |
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
23 HTask* getFirst(); |
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
24 HTask* getLast(); |
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
25 int remove(HTask* e); |
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
26 HTask* poll(); |
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
27 void moveToFirst(HTask* e); // or use(); |
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
28 HTask* get(int index); |
499 | 29 HTask* find(HTask *task); |
498
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
30 int empty(); |
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
31 void freePool() ; |
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
32 |
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
33 // Iterator |
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
34 HTask* getNext(HTask* q) ; |
499 | 35 int length(); |
498
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
36 |
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
37 private: |
46 | 38 /* variables */ |
498
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
39 |
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
40 static HTaskInfo taskQueuePool; |
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
41 HTask* first; |
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
42 HTask* last; |
46 | 43 |
44 /* functions */ | |
498
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
45 int extend_pool(int num); |
bce667ff20b9
double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
366
diff
changeset
|
46 void destroy(); |
46 | 47 }; |
48 | |
49 #endif |