forked from OSchip/llvm-project
Fix bad paste-o in the MSVC atomics.
Patch by Ðван СоÑокин. llvm-svn: 73779
This commit is contained in:
parent
59ba814f39
commit
ff5f14c15e
|
@ -59,7 +59,7 @@ sys::cas_flag sys::AtomicIncrement(volatile sys::cas_flag* ptr) {
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
return __sync_add_and_fetch(ptr, 1);
|
return __sync_add_and_fetch(ptr, 1);
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
return InterlockedCompareExchange(ptr, new_value, old_value);
|
return InterlockedIncrement(ptr);
|
||||||
#else
|
#else
|
||||||
# error No atomic increment implementation for your platform!
|
# error No atomic increment implementation for your platform!
|
||||||
#endif
|
#endif
|
||||||
|
@ -72,7 +72,7 @@ sys::cas_flag sys::AtomicDecrement(volatile sys::cas_flag* ptr) {
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
return __sync_sub_and_fetch(ptr, 1);
|
return __sync_sub_and_fetch(ptr, 1);
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
return InterlockedIncrement(ptr);
|
return InterlockedDecrement(ptr);
|
||||||
#else
|
#else
|
||||||
# error No atomic decrement implementation for your platform!
|
# error No atomic decrement implementation for your platform!
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue