[Pkg-mono-svn-commits] [mono] 18/23: Use InterlockedAdd64 () for Interlocked.Add (long&, long). (cherry picked from commit 421e1beea55d26d767dbd857e2f2276e3c6c2bee)
Jo Shields
directhex at alioth.debian.org
Wed Oct 23 22:14:31 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 07d515c192556269183638b3715db29ed2c8e9e3
Author: Alex Rønne Petersen <alexrp at xamarin.com>
Date: Wed Sep 25 20:31:18 2013 +0200
Use InterlockedAdd64 () for Interlocked.Add (long&, long).
(cherry picked from commit 421e1beea55d26d767dbd857e2f2276e3c6c2bee)
---
mono/metadata/threads.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/mono/metadata/threads.c b/mono/metadata/threads.c
index 9e57769..04d43fc 100755
--- a/mono/metadata/threads.c
+++ b/mono/metadata/threads.c
@@ -1955,14 +1955,7 @@ ves_icall_System_Threading_Interlocked_Add_Long (gint64 *location, gint64 value)
mono_raise_exception (mono_get_exception_not_implemented (NULL));
return 0;
#else
- gint64 orig;
-
- mono_interlocked_lock ();
- orig = *location;
- *location = orig + value;
- mono_interlocked_unlock ();
-
- return orig + value;
+ return InterlockedAdd64 (location, value);
#endif
}
--
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