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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
1 #ifndef INCLUDED_TASK_MANAGER
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
2 #define INCLUDED_TASK_MANAGER
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
3
307
7075842aa155 clean up include
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 297
diff changeset
4 #include "TaskManagerImpl.h"
7075842aa155 clean up include
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 297
diff changeset
5 #include "Random.h"
229
401b55a4a4dd add Random class
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 220
diff changeset
6
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
7 class TaskManager {
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
8 public:
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
9 /* constructor */
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
10 TaskManager(int num = 1); // The number of threads
194
gongo@localhost.localdomain
parents: 109
diff changeset
11 ~TaskManager(void);
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
12
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
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
401b55a4a4dd add Random class
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 220
diff changeset
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
gongo@localhost.localdomain
parents: 216
diff changeset
23 int get_cpuNum(void);
229
401b55a4a4dd add Random class
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 220
diff changeset
24 int get_random(void);
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
25
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
26 /* functions */
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
27 void init(void);
20
31a7ff27ee20 *** empty log message ***
gongo
parents: 18
diff changeset
28 void finish(void);
14
41ccd4b38184 *** empty log message ***
gongo
parents: 3
diff changeset
29
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
30 private:
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
31 int machineNum;
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
32 };
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
33
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
34 #endif
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
35
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
36 extern TaskManager *manager;
297
f8006660a45c start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 229
diff changeset
37