Commit df0f87e4 authored by thomas's avatar thomas
Browse files

corrected EOL-style

fixed CAS-functions for Windows (whew!!)

git-svn-id: https://svn.grrrr.org/ext/trunk@1232 4d9ac71a-51e6-0310-8455-cad1006bcd31
parent 7e7a8114
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -55,9 +55,11 @@ namespace lockfree
#if defined(__GNUC__) && ( (__GNUC__ > 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ >= 1)) )
return __sync_bool_compare_and_swap(addr, old, nw);
#elif defined(_MSC_VER)
return _InterlockedCompareExchange(addr,old,nw) == old;
ASSERT((size_t(addr)&3) == 0);
return _InterlockedCompareExchange(addr,nw,old) == old;
#elif defined(_WIN32)
return InterlockedCompareExchange(addr,old,nw) == old;
ASSERT((size_t(addr)&3) == 0);
return InterlockedCompareExchange(addr,nw,old) == old;
#elif defined(__APPLE__)
return OSAtomicCompareAndSwap32(old,nw,addr);
#elif defined(AO_HAVE_compare_and_swap_full)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment