summaryrefslogtreecommitdiff
path: root/libs/pbd/pbd
diff options
context:
space:
mode:
Diffstat (limited to 'libs/pbd/pbd')
-rw-r--r--libs/pbd/pbd/spinlock.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/pbd/pbd/spinlock.h b/libs/pbd/pbd/spinlock.h
index 41c40543f0..7173fde594 100644
--- a/libs/pbd/pbd/spinlock.h
+++ b/libs/pbd/pbd/spinlock.h
@@ -32,9 +32,11 @@ namespace PBD {
*
* initialize with BOOST_DETAIL_SPINLOCK_INIT
*/
+static boost::detail::spinlock sl_init = BOOST_DETAIL_SPINLOCK_INIT;
+
struct spinlock_t {
public:
- spinlock_t () : l (BOOST_DETAIL_SPINLOCK_INIT) {};
+ spinlock_t () : l (sl_init) {};
void lock () { l.lock (); }
void unlock () { l.unlock (); }
bool try_lock () { return l.try_lock (); }