aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu/drawable_control.hpp
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2012-09-05 18:30:34 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2013-01-13 22:40:53 +0100
commit9c34d27a8bc724722e9cae203e0c455573c3d5f1 (patch)
tree47066bed3a0dabf41fc7e7e103b71473e86db70c /src/menu/drawable_control.hpp
parent6887913d9abf9240d1b138936868c2a5dc91cac9 (diff)
downloadusdx-9c34d27a8bc724722e9cae203e0c455573c3d5f1.tar.gz
usdx-9c34d27a8bc724722e9cae203e0c455573c3d5f1.tar.xz
usdx-9c34d27a8bc724722e9cae203e0c455573c3d5f1.zip
menu: use boost::shared_mutex
Use everywhere a mutable boost::shared_mutex to enable locking during const getter and the multiple reader and single writer pattern.
Diffstat (limited to 'src/menu/drawable_control.hpp')
-rw-r--r--src/menu/drawable_control.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/menu/drawable_control.hpp b/src/menu/drawable_control.hpp
index 5d2aee27..ecee373d 100644
--- a/src/menu/drawable_control.hpp
+++ b/src/menu/drawable_control.hpp
@@ -26,7 +26,7 @@
#define DRAWABLE_CONTROL_HPP
#include <SDL/SDL.h>
-#include <boost/thread/mutex.hpp>
+#include <boost/thread/shared_mutex.hpp>
#include <log4cpp/Category.hh>
#include "drawable.hpp"
@@ -51,10 +51,10 @@ namespace usdx
Background* background;
- boost::mutex position_mutex;
- boost::mutex size_mutex;
- boost::mutex clipping_required_mutex;
- boost::mutex background_mutex;
+ mutable boost::shared_mutex position_mutex;
+ mutable boost::shared_mutex size_mutex;
+ mutable boost::shared_mutex clipping_required_mutex;
+ mutable boost::shared_mutex background_mutex;
protected:
Container* parent;