new
This commit is contained in:
16
smmapdfw/rateconn_worker/Mutex.H
Normal file
16
smmapdfw/rateconn_worker/Mutex.H
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#ifndef _MUTEX_H_
|
||||||
|
#define _MUTEX_H_
|
||||||
|
|
||||||
|
#include <pthread.h>
|
||||||
|
|
||||||
|
|
||||||
|
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_
|
Reference in New Issue
Block a user