Mercurial > hg > Members > kono > Cerium
view TaskManager/kernel/ppe/TaskManager.h @ 639:70c5c2d2eb24
fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 19 Nov 2009 18:45:24 +0900 (2009-11-19) |
parents | 0558abba673c |
children | 3b6290c05f9f |
line wrap: on
line source
#ifndef INCLUDED_TASK_MANAGER #define INCLUDED_TASK_MANAGER #include "TaskManagerImpl.h" #include "MemList.h" #include "HTask.h" class Scheduler; class MemList; class TaskManager { public: /* constructor */ TaskManager(int num = 1); // The number of threads ~TaskManager(); /* variables */ TaskManagerImpl *m_impl; void (*tm_end)(TaskManager *manager); /* user function */ HTaskPtr create_task(int cmd); HTaskPtr create_task(int cmd, memaddr r, long rs, memaddr w, long ws); void run(); void *allocate(int size); void set_TMend(void (*endf)(TaskManager *manager)); int get_cpuNum(); int get_random(); Scheduler *get_scheduler(); MemList* createMemList(int size, int count); /* functions */ void init(); void finish(); private: int machineNum; }; #endif //extern TaskManager *manager;