diff options
author | Alex Rønne Petersen <alexrp@xamarin.com> | 2013-09-25 20:20:20 +0200 |
---|---|---|
committer | Jo Shields <directhex@apebox.org> | 2013-10-23 15:09:30 +0100 |
commit | 07c705d468b7f42ad353eb86de2b7284693b656d (patch) | |
tree | 93d4bfa0e0682df2d7b371507c191b0210748776 | |
parent | 8d36fd126439b17471c4d1dc12cdcfed06c8a4e0 (diff) | |
download | mono-07c705d468b7f42ad353eb86de2b7284693b656d.tar.gz |
Use InterlockedIncrement64 () for Interlocked.Increment (long&).
(cherry picked from commit bb62cced7ef4145ad1feb5c1acdc5c324ce1ec23)
-rwxr-xr-x | mono/metadata/threads.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/mono/metadata/threads.c b/mono/metadata/threads.c index bd95303a62..b4c7a72557 100755 --- a/mono/metadata/threads.c +++ b/mono/metadata/threads.c @@ -1789,16 +1789,7 @@ gint32 ves_icall_System_Threading_Interlocked_Increment_Int (gint32 *location) gint64 ves_icall_System_Threading_Interlocked_Increment_Long (gint64 *location) { - gint64 ret; - - mono_interlocked_lock (); - - ret = ++ *location; - - mono_interlocked_unlock (); - - - return ret; + return InterlockedIncrement64 (location); } gint32 ves_icall_System_Threading_Interlocked_Decrement_Int (gint32 *location) |