It appears that on OSX the FPU settings on x86/amd64 are not inherited
to child threads of a process, leading to differences in precision between
the main thread and the sub thread. We now call mono_arch_cpu_init
on every thread on every platform
void
mono_arch_cpu_init (void)
{
+}
+
+/*
+ * Initialize architecture specific code.
+ */
+void
+mono_arch_init (void)
+{
#ifdef __APPLE__
int mib [3];
size_t len;
if (mono_cpu_count () > 1)
cpu_hw_caps |= PPC_SMP_CAPABLE;
-}
-
-/*
- * Initialize architecture specific code.
- */
-void
-mono_arch_init (void)
-{
InitializeCriticalSection (&mini_arch_mutex);
ss_trigger_page = mono_valloc (NULL, mono_pagesize (), MONO_MMAP_READ|MONO_MMAP_32BIT);
mono_debugger_thread_created (tid, thread->root_domain_thread, jit_tls, func);
if (thread)
thread->jit_data = jit_tls;
+
+ mono_arch_cpu_init ();
}
void (*mono_thread_attach_aborted_cb ) (MonoObject *obj) = NULL;
thread->jit_data = jit_tls;
if (mono_profiler_get_events () & MONO_PROFILE_STATISTICAL)
mono_runtime_setup_stat_profiler ();
+
+ mono_arch_cpu_init ();
}
static void