diff options
Diffstat (limited to 'server/src/mutex.h')
| -rw-r--r-- | server/src/mutex.h | 10 | 
1 files changed, 10 insertions, 0 deletions
| diff --git a/server/src/mutex.h b/server/src/mutex.h index 8b35042..cf052ad 100644 --- a/server/src/mutex.h +++ b/server/src/mutex.h @@ -35,6 +35,7 @@ public:    Mutex();    ~Mutex(); +  bool trylock();    void lock();    void unlock(); @@ -42,4 +43,13 @@ private:    pthread_mutex_t mutex;  }; +class MutexAutolock { +public: +  MutexAutolock(Mutex &mutex); +  ~MutexAutolock(); + +private: +  Mutex &mutex; +}; +  #endif/*__PRACRO_MUTEX_H__*/ | 
