From 74a28aa7125be6a603128ad600c98c4882f3b5c2 Mon Sep 17 00:00:00 2001 From: deva Date: Tue, 1 Jun 2010 12:58:32 +0000 Subject: From new_protocol branch. --- server/src/mutex.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'server/src/mutex.h') 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__*/ -- cgit v1.2.3