diff options
author | Robin Gareus <robin@gareus.org> | 2019-07-28 18:37:57 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-07-28 18:39:26 +0200 |
commit | 684b364a8a471c6ca43822ddfe41f0580b0ec83b (patch) | |
tree | dfbbaf21e30a9836b882d2014614366002d2495f /libs | |
parent | 63fee3b0c84b164bd6be2834f8f7e8cc608c38de (diff) |
Yet another spinlock init hack for g++8 std::atomics
Perhaps we should rather implement this ourselves,
using <boost/atomic.hpp>
Diffstat (limited to 'libs')
-rw-r--r-- | libs/pbd/spinlock.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/pbd/spinlock.cc b/libs/pbd/spinlock.cc index 4dfc8132ff..45e35daf37 100644 --- a/libs/pbd/spinlock.cc +++ b/libs/pbd/spinlock.cc @@ -21,13 +21,16 @@ #include <malloc.h> #endif +#include <cstring> + #include "pbd/spinlock.h" using namespace PBD; spinlock_t::spinlock_t () { - l = BOOST_DETAIL_SPINLOCK_INIT; + boost::detail::spinlock init = BOOST_DETAIL_SPINLOCK_INIT; + std::memcpy (&l, &init, sizeof (init)); } SpinLock::SpinLock (spinlock_t& lock) |