46
|
1 #ifndef INCLUDED_TASK_QUEUE_INFO
|
|
2 #define INCLUDED_TASK_QUEUE_INFO
|
|
3
|
|
4 #ifndef INCLUDED_TASK
|
|
5 # include "task.h"
|
|
6 #endif
|
|
7
|
|
8 #ifndef INCLUDED_HTASK_INFO
|
|
9 # include "HTaskInfo.h"
|
|
10 #endif
|
|
11
|
|
12 class TaskQueueInfo {
|
|
13 public:
|
|
14 /* constructor */
|
|
15 TaskQueueInfo(void);
|
|
16 ~TaskQueueInfo(void);
|
|
17
|
|
18 /* functions */
|
|
19 int init(int num);
|
|
20 TaskQueuePtr create(HTaskPtr task);
|
|
21 void free(TaskQueuePtr queue);
|
|
22 static TaskQueuePtr append(TaskQueuePtr list, TaskQueuePtr q);
|
|
23
|
|
24 private:
|
|
25 /* variables */
|
|
26 TaskQueuePtr taskQueuePool;
|
|
27 TaskQueuePtr freeTaskQueue;
|
|
28
|
|
29 /* functions */
|
|
30 int extend_pool(int num);
|
|
31 void destroy(void);
|
|
32 };
|
|
33
|
|
34 #endif
|