* exceptions-amd64.c (mono_arch_exceptions_init): Call
get_throw_pending_exception () to avoid initialization races.
* mini-exceptions.c (mono_exceptions_init): Call an arch specific
mono_arch_exceptions_init () function.
svn path=/trunk/mono/; revision=124456
2009-01-26 Zoltan Varga <vargaz@gmail.com>
2009-01-26 Zoltan Varga <vargaz@gmail.com>
+ * exceptions-amd64.c (mono_arch_exceptions_init): Call
+ get_throw_pending_exception () to avoid initialization races.
+
+ * mini-exceptions.c (mono_exceptions_init): Call an arch specific
+ mono_arch_exceptions_init () function.
+
* mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
2009-01-25 Zoltan Varga <vargaz@gmail.com>
* mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
2009-01-25 Zoltan Varga <vargaz@gmail.com>
*(gpointer*)(lmf->rsp - 8) = get_throw_pending_exception ();
}
*(gpointer*)(lmf->rsp - 8) = get_throw_pending_exception ();
}
+void
+mono_arch_exceptions_init (void)
+{
+ /* Call this to avoid initialization races */
+ get_throw_pending_exception ();
+}
+
#define MONO_ARCH_COMMON_VTABLE_TRAMPOLINE 1
#define MONO_ARCH_HAVE_CMOV_OPS 1
#define MONO_ARCH_HAVE_NOTIFY_PENDING_EXC 1
#define MONO_ARCH_COMMON_VTABLE_TRAMPOLINE 1
#define MONO_ARCH_HAVE_CMOV_OPS 1
#define MONO_ARCH_HAVE_NOTIFY_PENDING_EXC 1
+#define MONO_ARCH_HAVE_EXCEPTIONS_INIT 1
#define MONO_ARCH_ENABLE_GLOBAL_RA 1
#define MONO_ARCH_HAVE_GENERALIZED_IMT_THUNK 1
#if !defined(PLATFORM_WIN32) && !defined(HAVE_MOVING_COLLECTOR)
#define MONO_ARCH_ENABLE_GLOBAL_RA 1
#define MONO_ARCH_HAVE_GENERALIZED_IMT_THUNK 1
#if !defined(PLATFORM_WIN32) && !defined(HAVE_MOVING_COLLECTOR)
try_more_restore_tramp = mono_create_specific_trampoline (try_more_restore, MONO_TRAMPOLINE_RESTORE_STACK_PROT, mono_domain_get (), NULL);
restore_stack_protection_tramp = mono_create_specific_trampoline (restore_stack_protection, MONO_TRAMPOLINE_RESTORE_STACK_PROT, mono_domain_get (), NULL);
#endif
try_more_restore_tramp = mono_create_specific_trampoline (try_more_restore, MONO_TRAMPOLINE_RESTORE_STACK_PROT, mono_domain_get (), NULL);
restore_stack_protection_tramp = mono_create_specific_trampoline (restore_stack_protection, MONO_TRAMPOLINE_RESTORE_STACK_PROT, mono_domain_get (), NULL);
#endif
+
+#ifdef MONO_ARCH_HAVE_EXCEPTIONS_INIT
+ mono_arch_exceptions_init ();
+#endif