diff options
Diffstat (limited to 'src/threadUtils.hpp')
-rw-r--r-- | src/threadUtils.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/threadUtils.hpp b/src/threadUtils.hpp index 960e757..85500c1 100644 --- a/src/threadUtils.hpp +++ b/src/threadUtils.hpp @@ -30,12 +30,17 @@ */ #include <boost/thread.hpp> #include <boost/thread/mutex.hpp> +#include <boost/thread/shared_mutex.hpp> #include "datatypes.h" #ifndef __THREADUTILS__ #define __THREADUTILS__ typedef boost::mutex::scoped_lock Lock; typedef boost::mutex Mutex; +typedef boost::shared_mutex SharedMutex; +typedef boost::shared_lock<SharedMutex> ReadersLock; +typedef boost::unique_lock<SharedMutex> WritersLock; + class Semaphore { public: |