Mercurial > hg > Game > Cerium
view include/TaskManager/TaskManager.h @ 350:628cb162be88 draft
add tasts.xml renderer.xml
author | admin@mcbk.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Fri, 10 Jul 2009 16:41:20 +0900 |
parents | 3fc86ddf5d1c |
children | 5b995810b86a |
line wrap: on
line source
#ifndef INCLUDED_TASK_MANAGER #define INCLUDED_TASK_MANAGER #include "TaskManagerImpl.h" #include "Random.h" class TaskManager { public: /* constructor */ TaskManager(int num = 1); // The number of threads ~TaskManager(void); /* variables */ TaskManagerImpl *m_impl; void (*tm_end)(void); RandomPtr gen_random; /* user function */ HTaskPtr create_task(int cmd); void run(void); void *allocate(int size); void set_TMend(void (*endf)(void)); int get_cpuNum(void); int get_random(void); /* functions */ void init(void); void finish(void); private: int machineNum; }; #endif extern TaskManager *manager;