projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
63fee3b
)
Yet another spinlock init hack for g++8 std::atomics
author
Robin Gareus
<robin@gareus.org>
Sun, 28 Jul 2019 16:37:57 +0000
(18:37 +0200)
committer
Robin Gareus
<robin@gareus.org>
Sun, 28 Jul 2019 16:39:26 +0000
(18:39 +0200)
Perhaps we should rather implement this ourselves,
using <boost/atomic.hpp>
libs/pbd/spinlock.cc
patch
|
blob
|
history
diff --git
a/libs/pbd/spinlock.cc
b/libs/pbd/spinlock.cc
index 4dfc8132ffb99a6de324e34bec5ed82a4f6d683f..45e35daf370a458a8f33d06c96e7c7ee0f7dd62d 100644
(file)
--- 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)