diff --git a/libs/pbd/pbd/playback_buffer.h b/libs/pbd/pbd/playback_buffer.h index d41adea2e2..53c9531d39 100644 --- a/libs/pbd/pbd/playback_buffer.h +++ b/libs/pbd/pbd/playback_buffer.h @@ -41,7 +41,6 @@ public: PlaybackBuffer (guint sz, guint res = 8191) : reservation (res) - , _reservation_lock () { sz += reservation; size = power_of_two_size (sz); diff --git a/libs/pbd/pbd/spinlock.h b/libs/pbd/pbd/spinlock.h index eb784ac6ce..41c40543f0 100644 --- a/libs/pbd/pbd/spinlock.h +++ b/libs/pbd/pbd/spinlock.h @@ -29,8 +29,18 @@ namespace PBD { * bool try_lock(); * void unlock(); * }; + * + * initialize with BOOST_DETAIL_SPINLOCK_INIT */ -typedef boost::detail::spinlock spinlock_t; +struct spinlock_t { +public: + spinlock_t () : l (BOOST_DETAIL_SPINLOCK_INIT) {}; + void lock () { l.lock (); } + void unlock () { l.unlock (); } + bool try_lock () { return l.try_lock (); } +private: + boost::detail::spinlock l; +}; /* RAII wrapper */ class LIBPBD_API SpinLock {