Yet another spinlock init hack for g++8 std::atomics
Perhaps we should rather implement this ourselves, using <boost/atomic.hpp>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user