annotate TaskManager/kernel/ppe/HTaskInfo.h @ 499:981aa2f89a80 draft

still fixing...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 11 Oct 2009 15:42:00 +0900
parents bce667ff20b9
children 7ddbe22d4cdb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
1 #ifndef INCLUDED_HTASK_INFO
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
2 #define INCLUDED_HTASK_INFO
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
3
498
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
4 #include "Task.h"
307
3fc86ddf5d1c clean up include
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 109
diff changeset
5 #include "HTask.h"
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
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
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
9 public:
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
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
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
14
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
15 /* functions */
498
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
16 HTaskPtr HTaskInfo::create(int cmd);
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
17
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
18 void free_(HTaskPtr queue);
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
19
498
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
20 void addFirst(HTask* e);
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
21 void addLast(HTask* e);
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
22 HTask* getFirst();
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
23 HTask* getLast();
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
24 int remove(HTask* e);
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
25 HTask* poll();
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
26 void moveToFirst(HTask* e); // or use();
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
27 HTask* get(int index);
499
981aa2f89a80 still fixing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 498
diff changeset
28 HTask* find(HTask *task);
498
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
29 int empty();
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
30 void freePool() ;
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
31
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
32 // Iterator
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
33 HTask* getNext(HTask* q) ;
499
981aa2f89a80 still fixing...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 498
diff changeset
34 int length();
498
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
35
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
36 private:
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
37 /* variables */
498
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
38
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
39 static HTaskInfo taskQueuePool;
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
40 HTask* first;
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
41 HTask* last;
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
42
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
43 /* functions */
498
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
44 int extend_pool(int num);
bce667ff20b9 double linked HTaskInfo/HTask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
45 void destroy();
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
46 };
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
47
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
48 #endif