From Mathias Froehlich, "Update to the configure check for msvc 7.1.
MemoryBarrier() is used in the implementation, so it should be checked. This in effect disables the faster atomic ops on msvc 7.1 and older, even if only the MemoryBarrier() call is missing. But it ensures for the fist cut that it will build everywhere. If somebody cares for msvc 7.1 enough and has one for testing installed, he might provide the apropriate defines to guard that MemoryBarrier() call. I tested that msvc8 32/64bit still passes the configure tests and compiles. "
This commit is contained in:
@@ -77,6 +77,7 @@ int main(int, const char**)
|
||||
long* volatile ptr = &data;
|
||||
|
||||
InterlockedIncrement(&value);
|
||||
MemoryBarrier();
|
||||
InterlockedDecrement(&value);
|
||||
|
||||
if (0 != InterlockedCompareExchange(&value, 1, 0))
|
||||
|
||||
Reference in New Issue
Block a user