2010-07-10 Mark Probst <mark.probst@gmail.com>
[mono.git] / mono / mini / mini-darwin.c
index aaa74271e79ea9d0625d83f9cbef40f00a6ecb11..f80cff8a7cba392e88bbe74d13e5d527db8bd761 100644 (file)
@@ -43,6 +43,7 @@
 #include <mono/metadata/verify-internals.h>
 #include <mono/metadata/mempool-internals.h>
 #include <mono/metadata/attach.h>
+#include <mono/metadata/gc-internal.h>
 #include <mono/utils/mono-math.h>
 #include <mono/utils/mono-compiler.h>
 #include <mono/utils/mono-counters.h>
 #include <pthread.h>
 #include <dlfcn.h>
 
-#ifdef HAVE_SGEN_GC
-#undef pthread_create
-#undef pthread_join
-#undef pthread_detach
-#endif
-
 /*
  * This code disables the CrashReporter of MacOS X by installing
  * a dummy Mach exception handler.
@@ -185,8 +180,13 @@ macosx_register_exception_handler ()
                                            mach_exception_port,
                                            EXCEPTION_DEFAULT,
                                            MACHINE_THREAD_STATE) == KERN_SUCCESS);
+
+       mono_gc_register_mach_exception_thread (thread);
 }
 
+/* This is #define'd by Boehm GC to _GC_dlopen. */
+#undef dlopen
+
 void
 mono_runtime_install_handlers (void)
 {