mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Fix bad paste-o in the MSVC atomics.
Patch by Ðван СоÑокин. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73779 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1f0ba8c57b
commit
b9c2f58229
@ -59,7 +59,7 @@ sys::cas_flag sys::AtomicIncrement(volatile sys::cas_flag* ptr) {
|
||||
#elif defined(__GNUC__)
|
||||
return __sync_add_and_fetch(ptr, 1);
|
||||
#elif defined(_MSC_VER)
|
||||
return InterlockedCompareExchange(ptr, new_value, old_value);
|
||||
return InterlockedIncrement(ptr);
|
||||
#else
|
||||
# error No atomic increment implementation for your platform!
|
||||
#endif
|
||||
@ -72,7 +72,7 @@ sys::cas_flag sys::AtomicDecrement(volatile sys::cas_flag* ptr) {
|
||||
#elif defined(__GNUC__)
|
||||
return __sync_sub_and_fetch(ptr, 1);
|
||||
#elif defined(_MSC_VER)
|
||||
return InterlockedIncrement(ptr);
|
||||
return InterlockedDecrement(ptr);
|
||||
#else
|
||||
# error No atomic decrement implementation for your platform!
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user