Mercurial > hg > Members > kono > Cerium
annotate 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 |
rev | line source |
---|---|
3 | 1 #ifndef INCLUDED_TASK_MANAGER |
2 #define INCLUDED_TASK_MANAGER | |
3 | |
307 | 4 #include "TaskManagerImpl.h" |
5 #include "Random.h" | |
229 | 6 |
3 | 7 class TaskManager { |
8 public: | |
9 /* constructor */ | |
10 TaskManager(int num = 1); // The number of threads | |
194 | 11 ~TaskManager(void); |
3 | 12 |
13 /* variables */ | |
216
894675539cbf
rename cerium_main to TMmain, add TMend()
gongo@localhost.localdomain
parents:
194
diff
changeset
|
14 TaskManagerImpl *m_impl; |
894675539cbf
rename cerium_main to TMmain, add TMend()
gongo@localhost.localdomain
parents:
194
diff
changeset
|
15 void (*tm_end)(void); |
229 | 16 RandomPtr gen_random; |
216
894675539cbf
rename cerium_main to TMmain, add TMend()
gongo@localhost.localdomain
parents:
194
diff
changeset
|
17 |
894675539cbf
rename cerium_main to TMmain, add TMend()
gongo@localhost.localdomain
parents:
194
diff
changeset
|
18 /* user function */ |
894675539cbf
rename cerium_main to TMmain, add TMend()
gongo@localhost.localdomain
parents:
194
diff
changeset
|
19 HTaskPtr create_task(int cmd); |
894675539cbf
rename cerium_main to TMmain, add TMend()
gongo@localhost.localdomain
parents:
194
diff
changeset
|
20 void run(void); |
894675539cbf
rename cerium_main to TMmain, add TMend()
gongo@localhost.localdomain
parents:
194
diff
changeset
|
21 void *allocate(int size); |
894675539cbf
rename cerium_main to TMmain, add TMend()
gongo@localhost.localdomain
parents:
194
diff
changeset
|
22 void set_TMend(void (*endf)(void)); |
220 | 23 int get_cpuNum(void); |
229 | 24 int get_random(void); |
3 | 25 |
26 /* functions */ | |
27 void init(void); | |
20 | 28 void finish(void); |
14 | 29 |
3 | 30 private: |
31 int machineNum; | |
32 }; | |
33 | |
34 #endif | |
109 | 35 |
36 extern TaskManager *manager; | |
297 | 37 |