diff options
author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-12-15 18:09:07 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-12-15 18:09:07 +0000 |
commit | 571945e6affd20b19264ec22495da418d0fbdbb4 (patch) | |
tree | 076117cdf3579003f07cad4cdf0593347ce58150 /lib/System/Atomic.cpp | |
parent | 06f9d4012fb8acea3e9861d5722b5965dbb724d9 (diff) |
Notes
Diffstat (limited to 'lib/System/Atomic.cpp')
-rw-r--r-- | lib/System/Atomic.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/System/Atomic.cpp b/lib/System/Atomic.cpp index f9b55a186d18..7ba8b774d5e0 100644 --- a/lib/System/Atomic.cpp +++ b/lib/System/Atomic.cpp @@ -85,7 +85,7 @@ sys::cas_flag sys::AtomicAdd(volatile sys::cas_flag* ptr, sys::cas_flag val) { #elif defined(__GNUC__) return __sync_add_and_fetch(ptr, val); #elif defined(_MSC_VER) - return InterlockedAdd(ptr, val); + return InterlockedExchangeAdd(ptr, val) + val; #else # error No atomic add implementation for your platform! #endif |