109
|
1 #ifndef INCLUDED_TASK_GROUP
|
|
2 #define INCLUDED_TASK_GROUP
|
|
3
|
|
4 #ifndef INCLUDED_BASE_H_
|
|
5 # include "base.h"
|
|
6 #endif
|
|
7
|
|
8 #ifndef INCLUDED_TASK_QUEUE
|
|
9 # include "TaskQueue.h"
|
|
10 #endif
|
|
11
|
|
12 class TaskGroup {
|
|
13 public:
|
|
14 TaskGroup(void): group(NULL) {}
|
|
15
|
|
16 BASE_NEW_DELETE(TaskGroup);
|
|
17
|
|
18 unsigned int command;
|
|
19 TaskQueuePtr group;
|
|
20
|
|
21 /**
|
|
22 * 待つ Task を追加
|
|
23 */
|
|
24 void add(TaskPtr add_task);
|
|
25
|
|
26 /**
|
|
27 * 終了した Task を group から削除
|
|
28 */
|
|
29 void remove(TaskPtr delete_task);
|
|
30
|
|
31 /**
|
|
32 * 空 (待つタスクが無い) の時が、この TaskGroup が持つ、
|
|
33 * PPE に送るべきコマンドを返す。
|
|
34 * まだ待つべきタスクがある場合は 0 を返す
|
|
35 */
|
|
36 unsigned int status(void);
|
|
37 };
|
|
38
|
|
39 typedef TaskGroup* TaskGroupPtr;
|
|
40
|
|
41 #endif
|