OpenDaVINCI  4.16.0
POSIXMutex.h
Go to the documentation of this file.
1 
20 #ifndef OPENDAVINCI_CORE_WRAPPER_POSIX_POSIXMUTEX_H_
21 #define OPENDAVINCI_CORE_WRAPPER_POSIX_POSIXMUTEX_H_
22 
23 #include <pthread.h>
24 
27 
28 namespace odcore { namespace wrapper { template <odcore::wrapper::SystemLibraryProducts product> class MutexFactoryWorker; } }
29 
30 namespace odcore {
31  namespace wrapper {
32  namespace POSIX {
33 
40  class POSIXMutex : public Mutex {
41  private:
43  friend class POSIXCondition;
44  protected:
45  POSIXMutex();
46 
47  private:
53  POSIXMutex(const POSIXMutex &);
54 
60  POSIXMutex& operator=(const POSIXMutex &);
61 
62  public:
63  virtual ~POSIXMutex();
64 
65  virtual void lock();
66 
67  virtual bool tryLock();
68 
69  virtual void unlock();
70 
71  pthread_mutex_t& getNativeMutex();
72 
73  private:
74  pthread_mutex_t m_mutex;
75  };
76 
77  }
78  }
79 } // odcore::wrapper::POSIX
80 
81 #endif /*OPENDAVINCI_CORE_WRAPPER_POSIX_POSIXMUTEX_H_*/
Definition: MutexFactoryWorker.h:41
virtual void lock()
Definition: POSIXMutex.cpp:45
virtual ~POSIXMutex()
Definition: POSIXMutex.cpp:41
Definition: base/Mutex.h:49
pthread_mutex_t & getNativeMutex()
Definition: POSIXMutex.cpp:57
Definition: POSIXMutex.h:40
virtual bool tryLock()
Definition: POSIXMutex.cpp:49
virtual void unlock()
Definition: POSIXMutex.cpp:53
Definition: POSIXCondition.h:43
POSIXMutex()
Definition: POSIXMutex.cpp:32
Definition: SystemLibraryProducts.h:28