Belle II Software  release-05-02-19
MCond.h
1 #ifndef _Belle2_MCond_h
2 #define _Belle2_MCond_h
3 
4 #include "daq/slc/system/MMutex.h"
5 
6 #include <pthread.h>
7 
8 namespace Belle2 {
14  class MCond {
15 
16  public:
17  static size_t size() { return sizeof(pthread_cond_t); }
18 
19  // constructors and destructor
20  public:
21  MCond();
22  MCond(const MCond&);
23  MCond(void*);
24  ~MCond();
25 
26  // member functions;
27  public:
28  bool init(void*);
29  bool init();
30  bool set(void*);
31  bool signal();
32  bool broadcast();
33  bool wait(MMutex& mutex);
34  bool wait(MMutex& mutex, const unsigned int sec,
35  const unsigned int msec = 0);
36  bool destroy();
37 
38  public:
39  const MCond& operator=(const MCond&);
40 
41  // data members;
42  private:
43  pthread_cond_t* m_cond;
44 
45  };
46 
48 };
49 
50 #endif
Belle2::MMutex
Definition: MMutex.h:19
Belle2::MCond
Definition: MCond.h:14
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19