|
Boost : |
Subject: [boost] [atomic] ia32/cmpxchg8b fix
From: Tim Blechmann (tim_at_[hidden])
Date: 2012-09-07 09:05:05
one of my users reported an issue with atomic on gcc/ia32, related to
const-correctness.
ok to commit this fix?
thanks, tim
Index: boost/atomic/detail/gcc-x86.hpp
===================================================================
--- boost/atomic/detail/gcc-x86.hpp (revision 80433)
+++ boost/atomic/detail/gcc-x86.hpp (working copy)
@@ -1556,11 +1556,11 @@
template<typename T>
T
-platform_load64(volatile T * ptr)
+platform_load64(const volatile T * ptr)
{
T expected = *ptr;
do {
- } while (!platform_cmpxchg64_strong(expected, expected, ptr));
+ } while (!platform_cmpxchg64_strong(expected, expected,
const_cast<volatile T*>(ptr)));
return expected;
}
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk