Mercurial > hg > Game > Cerium
view TaskManager/kernel/ppe/TaskManagerImpl.h @ 546:d6ba5ede4fe7 draft
....
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 16 Oct 2009 17:57:17 +0900 |
parents | 3bc98f6d31ff |
children | e5431e658038 |
line wrap: on
line source
#ifndef INCLUDED_TASK_MANAGER_IMPL #define INCLUDED_TASK_MANAGER_IMPL #include "MailManager.h" #include "ListData.h" #include "Scheduler.h" #include "TaskListInfo.h" #include "TaskQueueInfo.h" #include "HTaskInfo.h" 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); 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