OpenDaVINCI  4.16.0
POSIXCondition.h
Go to the documentation of this file.
1 
20 #ifndef OPENDAVINCI_CORE_WRAPPER_POSIX_POSIXCONDITION_H_
21 #define OPENDAVINCI_CORE_WRAPPER_POSIX_POSIXCONDITION_H_
22 
23 #include <pthread.h>
24 
29 
30 namespace odcore { namespace wrapper { template <odcore::wrapper::SystemLibraryProducts product> class ConditionFactoryWorker; } }
31 
32 namespace odcore {
33  namespace wrapper {
34  namespace POSIX {
35 
43  class POSIXCondition : public Condition {
44  private:
46 
48 
49  private:
56 
62  POSIXCondition& operator=(const POSIXCondition &);
63 
64  public:
65  virtual ~POSIXCondition();
66 
67  virtual void waitOnSignal();
68 
69  virtual bool waitOnSignalWithTimeout(const unsigned long ms);
70 
71  virtual void wakeOne();
72 
73  virtual void wakeAll();
74 
75  virtual void lock();
76 
77  virtual bool tryLock();
78 
79  virtual void unlock();
80 
81  private:
82  pthread_cond_t m_condition;
83  POSIXMutex m_mutex;
84  };
85 
86  }
87  }
88 } // odcore::wrapper::POSIX
89 
90 #endif /*OPENDAVINCI_CORE_WRAPPER_POSIX_POSIXCONDITION_H_*/
Definition: base/Condition.h:64
virtual bool tryLock()
Definition: POSIXCondition.cpp:89
virtual ~POSIXCondition()
Definition: POSIXCondition.cpp:44
virtual void wakeOne()
Definition: POSIXCondition.cpp:77
virtual void waitOnSignal()
Definition: POSIXCondition.cpp:48
Definition: ConditionFactoryWorker.h:39
Definition: POSIXMutex.h:40
virtual void wakeAll()
Definition: POSIXCondition.cpp:81
Definition: POSIXCondition.h:43
virtual void lock()
Definition: POSIXCondition.cpp:85
Definition: SystemLibraryProducts.h:28
virtual void unlock()
Definition: POSIXCondition.cpp:93
virtual bool waitOnSignalWithTimeout(const unsigned long ms)
Definition: POSIXCondition.cpp:52