[mono/mono] b37ba148: Don't assert in Interlocked.Add () icalls on 64-bit systems.
| Newsgroups | gmane.comp.gnome.mono.patches |
|---|---|
| Message-ID | <00000141f6faf438-0758e51e-6d3b-434d-bb91-d371b96de700-000000@email.amazonses.com> |
Branch: refs/heads/master
Home: https://github.com/mono/mono
Compare: https://github.com/mono/mono/compare/4b6494f0c640...b37ba14801ab
Commit: b37ba14801aba24bf6a58dbe12800bb9416e3ef6
Author: Alex Rønne Petersen <[email protected]>
Date: 2013-10-26 22:52:09 GMT
URL: https://github.com/mono/mono/commit/b37ba14801aba24bf6a58dbe12800bb9416e3ef6
Don't assert in Interlocked.Add () icalls on 64-bit systems.
The checks here were wrong in the first place; they should have
checked for MONO_ARCH_HAVE_ATOMIC_ADD rather than SIZEOF_VOID_P.
But regardless, these methods need to work when invoked via
reflection, which they wouldn't previously.
Changed paths:
M mono/metadata/threads.c
Modified: mono/metadata/threads.c
===================================================================
@@ -1939,25 +1939,13 @@ gfloat ves_icall_System_Threading_Interlocked_CompareExchange_Single (gfloat *lo
gint32
ves_icall_System_Threading_Interlocked_Add_Int (gint32 *location, gint32 value)
{
-#if SIZEOF_VOID_P == 8
- /* Should be implemented as a JIT intrinsic */
- mono_raise_exception (mono_get_exception_not_implemented (NULL));
- return 0;
-#else
return InterlockedAdd (location, value);
-#endif
}
gint64
ves_icall_System_Threading_Interlocked_Add_Long (gint64 *location, gint64 value)
{
-#if SIZEOF_VOID_P == 8
- /* Should be implemented as a JIT intrinsic */
- mono_raise_exception (mono_get_exception_not_implemented (NULL));
- return 0;
-#else
return InterlockedAdd64 (location, value);
-#endif
}
gint64
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches