From b9c2f582290612ae1f37a53c2760037525289677 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Fri, 19 Jun 2009 18:37:50 +0000 Subject: [PATCH] Fix bad paste-o in the MSVC atomics. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Иван Сорокин. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73779 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/System/Atomic.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/System/Atomic.cpp b/lib/System/Atomic.cpp index 5676ca9d62c..416f981df82 100644 --- a/lib/System/Atomic.cpp +++ b/lib/System/Atomic.cpp @@ -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