Mercurial > hg > Game > Cerium
view include/TaskManager/BufferManager.h @ 93:dd33ec2e51b9
*** empty log message ***
author | gongo |
---|---|
date | Thu, 28 Feb 2008 17:32:18 +0900 |
parents | 504899860e66 |
children | 028ffc9c0375 |
line wrap: on
line source
#ifndef INCLUDED_BUFFER_MANAGER #define INCLUDED_BUFFER_MANAGER #ifndef INCLUDED_TASK # include "task.h" #endif #ifndef INCLUDED_TYPES # include "types.h" #endif #ifndef INCLUDED_TASK_LIST_INFO # include "TaskListInfo.h" #endif #ifndef INCLUDED_TASK_QUEUE_INFO # include "TaskQueueInfo.h" #endif #ifndef INCLUDED_HTASK_INFO # include "HTaskInfo.h" #endif #ifndef INCLUDED_DMA_BUFFER # include "DmaBuffer.h" #endif class BufferManager { public: /* constructor */ BufferManager(int num = 1); virtual ~BufferManager(void); /* variables */ TaskListInfo *taskListImpl; TaskQueueInfo *taskQueueImpl; HTaskInfo *htaskImpl; int machineNum; TaskQueuePtr activeTaskQueue; TaskQueuePtr waitTaskQueue; TaskListPtr mainTaskList; /* function */ virtual void init(void); TaskQueuePtr create_taskQueue(HTaskPtr); //HTaskPtr create_task(int cmd, int siz, DmaBuffer *in, DmaBuffer *out); HTaskPtr create_task(int cmd, int siz, unsigned int in, unsigned int out); void free_taskQueue(TaskQueuePtr); void free_task(HTaskPtr); // task list virtual TaskListPtr get_available_taskList(void); void finish(void); virtual void clear_taskList(void); virtual void append_activeTask(HTaskPtr); virtual void append_waitTask(HTaskPtr); void check_task_finish(HTaskPtr task); void notify_wait_taskQueue(HTaskPtr depend, TaskQueuePtr list); TaskQueuePtr remove_taskQueue(TaskQueuePtr list, TaskQueuePtr task); TaskQueuePtr remove_taskQueue_eq_task(TaskQueuePtr list, HTaskPtr task); void remove_taskQueue_all(TaskQueuePtr list); private: }; #endif