
22 Aug
2008
22 Aug
'08
1:35 a.m.
Simon Thornington:
Hi folks,
Quick question about the use of _ReadWriteBarrier (Win32 MSVC):
According to http://msdn.microsoft.com/en-us/library/ms684208(VS.85).aspx , this compiler intrinsic doesn't generate any memory fencing instructions at all, it's strictly a compiler optimization barrier. I was wondering if someone had any documentation to contradict this, or if boost is relying on the new volatile semantics in VC2005 to ensure the fence?
It sure looks like it's being used as if it were a real memory fence, but I am not sure that's the case. I'm not an expert though.
What specific _ReadWriteBarrier use do you find suspicious?