Mercurial > hg > Members > kono > Cerium
view include/TaskManager/TaskManager.h @ 311:b09784a9cb09
add smanager interface for test_nogl
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 08 Jun 2009 22:35:44 +0900 |
parents | 7075842aa155 |
children | b89ba1d96fff |
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;