From be4fc7990b91e1fb053df4a1388f13aaad9772f8 Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 17 Dec 2009 12:44:56 +0000 Subject: Ported to the new test framework. --- 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