[llvm-commits] [llvm] r73779 - /llvm/trunk/lib/System/Atomic.cpp
Owen Anderson
resistor at mac.com
Fri Jun 19 11:37:51 PDT 2009
Author: resistor
Date: Fri Jun 19 13:37:50 2009
New Revision: 73779
URL: http://llvm.org/viewvc/llvm-project?rev=73779&view=rev
Log:
Fix bad paste-o in the MSVC atomics.
Patch by Ðван СоÑокин.
Modified:
llvm/trunk/lib/System/Atomic.cpp
Modified: llvm/trunk/lib/System/Atomic.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Atomic.cpp?rev=73779&r1=73778&r2=73779&view=diff
==============================================================================
--- llvm/trunk/lib/System/Atomic.cpp (original)
+++ llvm/trunk/lib/System/Atomic.cpp Fri Jun 19 13:37:50 2009
@@ -59,7 +59,7 @@
#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 @@
#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
More information about the llvm-commits
mailing list