My Project
simpleschedule.hpp
1 
20 #ifndef _SIMPLESSCHEDULE_HPP_
21 #define _SIMPLESSCHEDULE_HPP_ 1
22 #include <vector>
23 #include <pthread.h>
24 
25 class Map;
26 namespace raft{
27  class kernel;
28 }
29 
30 class simple_schedule : public Schedule
31 {
32 public:
33  simple_schedule( Map &map );
34 
35  virtual ~simple_schedule();
36 
37  virtual void start();
38 
39 protected:
40  void handleSchedule( raft::kernel * const kernel );
41 
42  static void* simple_run( void * data );
43  struct thread_data
44  {
45  raft::kernel *k = nullptr;
46  bool *finished = nullptr;
47  int loc = -1;
48  };
49 
51  {
52  pthread_t th;
53  bool finished = false;
54  bool term = false;
55  thread_data data;
56  };
57 
58 
59  pthread_mutex_t thread_map_mutex;
60  std::vector< thread_info_t* > thread_map;
61 };
62 #endif /* END _SIMPLESSCHEDULE_HPP_ */
virtual void start()
Definition: simpleschedule.cpp:55
Definition: simpleschedule.hpp:30
Definition: simpleschedule.hpp:50
void handleSchedule(raft::kernel *const kernel)
Definition: simpleschedule.cpp:108
Definition: map.hpp:47
Definition: simpleschedule.hpp:43
Definition: schedule.hpp:34
Definition: kernel.hpp:57
Definition: globalmap.cpp:3
simple_schedule(Map &map)
Definition: simpleschedule.cpp:36