id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 6782,call_once uses incorrect barrier intrinsic on Visual Studio,ybungalobill@…,viboes,"boost\thread\win32\interlocked_read.hpp uses _ReadWriteBarrier() as a barrier. However, [http://msdn.microsoft.com/en-us/library/f20w0x5e%28v=vs.100%29.aspx according to MSDN] and the machine code generated, it doesn't emit any memory barrier instructions at all: > The _ReadBarrier, _WriteBarrier, and _ReadWriteBarrier compiler intrinsics prevent only compiler re-ordering. To prevent the CPU from re-ordering read and write operations, use the MemoryBarrier macro. So one should use the MemoryBarrier() macro instead. In fact according [http://msdn.microsoft.com/en-us/library/windows/desktop/ms684208%28v=vs.85%29.aspx this page] _ReadWriteBarrier is not necessary for volatile variables access since VS2005. Thanks, Y. Galka.",Bugs,closed,Boost 1.57.0,thread,Boost 1.49.0,Problem,fixed,,