[Pkg-mono-svn-commits] [mono] 23/23: [runtime] Fix the interlocked increment/decrement/add functions. (cherry picked from commit 6be13313df2f8ed6d2b0ecbab78df4b026bfb665)

Jo Shields directhex at alioth.debian.org
Wed Oct 23 22:14:32 UTC 2013


This is an automated email from the git hooks/post-receive script.

directhex pushed a commit to branch master-experimental-patches/atomics_support_on_fringe_32bit_platforms
in repository mono.

commit d6629c36cfe8add9f2cab0194c1f7d504a52af26
Author: Zoltan Varga <vargaz at gmail.com>
Date:   Tue Oct 22 15:11:44 2013 +0200

    [runtime] Fix the interlocked increment/decrement/add functions.
    (cherry picked from commit 6be13313df2f8ed6d2b0ecbab78df4b026bfb665)
---
 mono/utils/atomic.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mono/utils/atomic.h b/mono/utils/atomic.h
index f701a44..151248a 100755
--- a/mono/utils/atomic.h
+++ b/mono/utils/atomic.h
@@ -183,7 +183,7 @@ static inline gint64 InterlockedIncrement64(volatile gint64 *val)
 	do {
 		get = *val;
 		set = get + 1;
-	} while (InterlockedCompareExchange64 (val, set, get) != set);
+	} while (InterlockedCompareExchange64 (val, set, get) != get);
 	return set;
 }
 
@@ -193,7 +193,7 @@ static inline gint64 InterlockedDecrement64(volatile gint64 *val)
 	do {
 		get = *val;
 		set = get - 1;
-	} while (InterlockedCompareExchange64 (val, set, get) != set);
+	} while (InterlockedCompareExchange64 (val, set, get) != get);
 	return set;
 }
 
@@ -203,7 +203,7 @@ static inline gint64 InterlockedAdd64(volatile gint64 *dest, gint64 add)
 	do {
 		get = *dest;
 		set = get + add;
-	} while (InterlockedCompareExchange64 (dest, set, get) != set);
+	} while (InterlockedCompareExchange64 (dest, set, get) != get);
 	return set;
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mono/packages/mono.git



More information about the Pkg-mono-svn-commits mailing list