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.
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