From d1143bee85f80af2e8f2ef688df713e5a4bf1851 Mon Sep 17 00:00:00 2001 From: whottgen <> Date: Fri, 24 Apr 2009 11:27:33 +0000 Subject: [PATCH] new --- smmapdfw/rateconn_worker/Mutex.H | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 smmapdfw/rateconn_worker/Mutex.H diff --git a/smmapdfw/rateconn_worker/Mutex.H b/smmapdfw/rateconn_worker/Mutex.H new file mode 100644 index 0000000..6921347 --- /dev/null +++ b/smmapdfw/rateconn_worker/Mutex.H @@ -0,0 +1,16 @@ +#ifndef _MUTEX_H_ +#define _MUTEX_H_ + +#include + + +class Mutex { +public: + Mutex(pthread_mutex_t *mutex) : m_mutex(mutex) { pthread_mutex_lock(m_mutex); }; + ~Mutex() { pthread_mutex_unlock(m_mutex); } +private: + pthread_mutex_t *m_mutex; +}; + + +#endif // _MUTEX_H_ \ No newline at end of file