annotate include/TaskManager/BufferManager.h @ 80:1c648675c2bd

*** empty log message ***
author gongo
date Wed, 20 Feb 2008 10:56:37 +0900
parents 83b57e03d3ef
children 504899860e66
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_BUFFER_MANAGER
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
2 #define INCLUDED_BUFFER_MANAGER
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
3
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
4 #ifndef INCLUDED_TASK
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
5 # include "task.h"
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
6 #endif
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
7
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
8 #ifndef INCLUDED_TYPES
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
9 # include "types.h"
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
10 #endif
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
11
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
12 #ifndef INCLUDED_TASK_LIST_INFO
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
13 # include "TaskListInfo.h"
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
14 #endif
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
15
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
16 #ifndef INCLUDED_TASK_QUEUE_INFO
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
17 # include "TaskQueueInfo.h"
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
18 #endif
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
19
54
90523ccc4dff *** empty log message ***
gongo
parents: 46
diff changeset
20 #ifndef INCLUDED_HTASK_INFO
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
21 # include "HTaskInfo.h"
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
22 #endif
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
23
54
90523ccc4dff *** empty log message ***
gongo
parents: 46
diff changeset
24 #ifndef INCLUDED_DMA_BUFFER
90523ccc4dff *** empty log message ***
gongo
parents: 46
diff changeset
25 # include "DmaBuffer.h"
90523ccc4dff *** empty log message ***
gongo
parents: 46
diff changeset
26 #endif
90523ccc4dff *** empty log message ***
gongo
parents: 46
diff changeset
27
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
28 class BufferManager {
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
29 public:
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
30 /* constructor */
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
31 BufferManager(int num = 1);
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
32 virtual ~BufferManager(void);
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
33
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
34 /* variables */
63
54355e641172 *** empty log message ***
gongo
parents: 58
diff changeset
35 TaskListInfo *taskListImpl;
54355e641172 *** empty log message ***
gongo
parents: 58
diff changeset
36 TaskQueueInfo *taskQueueImpl;
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
37 HTaskInfo *htaskImpl;
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
38
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
39 int machineNum;
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
40 TaskQueuePtr activeTaskQueue;
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
41 TaskQueuePtr waitTaskQueue;
63
54355e641172 *** empty log message ***
gongo
parents: 58
diff changeset
42 TaskListPtr mainTaskList;
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
43
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
44 /* function */
58
7492eb28b577 *** empty log message ***
gongo
parents: 54
diff changeset
45 virtual void init(void);
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
47 TaskQueuePtr create_taskQueue(HTaskPtr);
80
1c648675c2bd *** empty log message ***
gongo
parents: 79
diff changeset
48 HTaskPtr create_task(int cmd, int siz, DmaBuffer *in, DmaBuffer *out);
1c648675c2bd *** empty log message ***
gongo
parents: 79
diff changeset
49 //HTaskPtr create_task(int cmd, int siz, unsigned int in, unsigned int out);
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
50 void free_taskQueue(TaskQueuePtr);
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
51 void free_task(HTaskPtr);
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
52
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
53 // task list
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
54 virtual TaskListPtr get_available_taskList(void);
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
55
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
56 void finish(void);
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
57
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
58 virtual void clear_taskList(void);
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
59
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
60 virtual void append_activeTask(HTaskPtr);
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
61 virtual void append_waitTask(HTaskPtr);
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
62
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
63 void check_task_finish(HTaskPtr task);
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
64 void notify_wait_taskQueue(HTaskPtr depend, TaskQueuePtr list);
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
65 TaskQueuePtr remove_taskQueue(TaskQueuePtr list, TaskQueuePtr task);
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
66 TaskQueuePtr remove_taskQueue_eq_task(TaskQueuePtr list, HTaskPtr task);
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
67
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
68 private:
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
69 };
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
70
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
71 #endif