46
|
1 #ifndef INCLUDED_BUFFER_MANAGER
|
|
2 #define INCLUDED_BUFFER_MANAGER
|
|
3
|
|
4 #ifndef INCLUDED_TYPES
|
|
5 # include "types.h"
|
|
6 #endif
|
|
7
|
|
8 #ifndef INCLUDED_TASK_LIST_INFO
|
|
9 # include "TaskListInfo.h"
|
|
10 #endif
|
|
11
|
|
12 #ifndef INCLUDED_TASK_QUEUE_INFO
|
|
13 # include "TaskQueueInfo.h"
|
|
14 #endif
|
|
15
|
54
|
16 #ifndef INCLUDED_HTASK_INFO
|
46
|
17 # include "HTaskInfo.h"
|
|
18 #endif
|
|
19
|
291
|
20 /*!
|
|
21 * Task Input/Output buffer manager
|
|
22 *
|
|
23 */
|
|
24
|
46
|
25 class BufferManager {
|
|
26 public:
|
|
27 /* constructor */
|
|
28 BufferManager(int num = 1);
|
|
29 virtual ~BufferManager(void);
|
|
30
|
|
31 /* variables */
|
63
|
32 TaskListInfo *taskListImpl;
|
|
33 TaskQueueInfo *taskQueueImpl;
|
46
|
34 HTaskInfo *htaskImpl;
|
|
35
|
|
36 int machineNum;
|
|
37
|
|
38 /* function */
|
58
|
39 virtual void init(void);
|
46
|
40
|
109
|
41 // TaskList
|
|
42 TaskListPtr create_taskList(void);
|
|
43 void free_taskList(TaskListPtr);
|
|
44 TaskListPtr clear_taskList(TaskListPtr);
|
|
45
|
|
46 // TaskQueue
|
46
|
47 TaskQueuePtr create_taskQueue(HTaskPtr);
|
|
48 void free_taskQueue(TaskQueuePtr);
|
109
|
49
|
|
50 // HTask
|
|
51 HTaskPtr create_task(int cmd);
|
46
|
52 void free_task(HTaskPtr);
|
|
53
|
|
54
|
|
55 void finish(void);
|
|
56 private:
|
|
57 };
|
|
58
|
|
59 #endif
|