[Pkg-mono-svn-commits] [mono] 17/23: Use InterlockedAdd () for Interlocked.Add (int&, int). (cherry picked from commit 89a99c26341d0c09e30fb263c5a08fe80aa21369)
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 2676ce49b2f4082f79ff6991734fbc8b1c94c79d
Author: Alex Rønne Petersen <alexrp at xamarin.com>
Date: Wed Sep 25 20:31:06 2013 +0200
Use InterlockedAdd () for Interlocked.Add (int&, int).
(cherry picked from commit 89a99c26341d0c09e30fb263c5a08fe80aa21369)
---
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 4f710ce..9e57769 100755
--- a/mono/metadata/threads.c
+++ b/mono/metadata/threads.c
@@ -1943,14 +1943,7 @@ ves_icall_System_Threading_Interlocked_Add_Int (gint32 *location, gint32 value)
mono_raise_exception (mono_get_exception_not_implemented (NULL));
return 0;
#else
- gint32 orig;
-
- mono_interlocked_lock ();
- orig = *location;
- *location = orig + value;
- mono_interlocked_unlock ();
-
- return orig + value;
+ return InterlockedAdd (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