Mercurial > hg > Game > Cerium
view TaskManager/kernel/ppe/TaskManagerImpl.h @ 634:62e570ac5db2 draft
SimpleTask start
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 18 Nov 2009 17:29:14 +0900 |
parents | 278db3ca751d |
children | aba1600e8f83 |
line wrap: on
line source
#ifndef INCLUDED_TASK_MANAGER_IMPL #define INCLUDED_TASK_MANAGER_IMPL #include "MailManager.h" #include "ListData.h" #include "TaskListInfo.h" #include "TaskQueueInfo.h" #include "HTaskInfo.h" class Scheduler; class MemList; class TaskManagerImpl { public: /* variables */ int machineNum; HTaskInfo *activeTaskQueue; HTaskInfo *waitTaskQueue; TaskListInfo *taskListImpl; TaskQueueInfo *taskQueueImpl; HTaskInfo *htaskImpl; SchedTask *schedTaskManager; /* constructor */ TaskManagerImpl(int num = 1) ; virtual ~TaskManagerImpl() { } /* functions */ // system virtual void init() = 0; virtual void run() = 0; virtual void append_activeTask(HTaskPtr); virtual void append_waitTask(HTaskPtr); void check_task_finish(HTaskPtr task); void wakeup_waitTask(); void systask_init(); // user HTaskPtr create_task(int cmd); HTaskPtr create_task(int cmd, void *rbuf, long r_size, void *rbuf, long w_size); void set_task_depend(HTaskPtr master, HTaskPtr slave); void spawn_task(HTaskPtr); void set_task_cpu(HTaskPtr, CPU_TYPE); virtual void* allocate(int size) = 0; virtual void* allocate(int size,int align) = 0; virtual Scheduler* get_scheduler() = 0; }; #endif