Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6782: call_once uses incorrect barrier intrinsic on Visual Studio
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-03-03 23:18:08
#6782: call_once uses incorrect barrier intrinsic on Visual Studio
-------------------------------------+--------------------------------------
Reporter: ybungalobill@⦠| Owner: viboes
Type: Bugs | Status: assigned
Milestone: To Be Determined | Component: thread
Version: Boost 1.49.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------------+--------------------------------------
Comment (by viboes):
wouldn't be enough to remove these lines and let the implementation using
boost/detail/interlocked.hpp?
{{{
#ifdef BOOST_MSVC
extern "C" void _ReadWriteBarrier(void);
#pragma intrinsic(_ReadWriteBarrier)
namespace boost
{
namespace detail
{
inline long interlocked_read_acquire(long volatile* x)
BOOST_NOEXCEPT
{
long const res=*x;
_ReadWriteBarrier();
return res;
}
inline void* interlocked_read_acquire(void* volatile* x)
BOOST_NOEXCEPT
{
void* const res=*x;
_ReadWriteBarrier();
return res;
}
inline void interlocked_write_release(long volatile* x,long value)
BOOST_NOEXCEPT
{
_ReadWriteBarrier();
*x=value;
}
inline void interlocked_write_release(void* volatile* x,void*
value) BOOST_NOEXCEPT
{
_ReadWriteBarrier();
*x=value;
}
}
}
#else
#endif
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6782#comment:2> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:12 UTC