X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fmini-darwin.c;h=5ec06d20a748c8036e64b9900bbc623f3a47b723;hb=32455dbbe90d3f7826a2bae5a95360e050f04172;hp=6250b25ab7f3269c709ffa2600552695e04c54f6;hpb=e7951e6ee0786855af92d677d5fb20fe14f5ecdf;p=mono.git diff --git a/mono/mini/mini-darwin.c b/mono/mini/mini-darwin.c index 6250b25ab7f..5ec06d20a74 100644 --- a/mono/mini/mini-darwin.c +++ b/mono/mini/mini-darwin.c @@ -69,7 +69,7 @@ #include #include -#if (MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_5) && !defined (TARGET_ARM) +#if defined (TARGET_OSX) && (MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_5) #define NEEDS_EXCEPTION_THREAD #endif @@ -96,6 +96,15 @@ typedef struct { /* The exception port */ static mach_port_t mach_exception_port = VM_MAP_NULL; +kern_return_t +catch_exception_raise ( + mach_port_t exception_port, + mach_port_t thread, + mach_port_t task, + exception_type_t exception, + exception_data_t code, + mach_msg_type_number_t code_count); + /* * Implicitly called by exc_server. Must be public. * @@ -159,7 +168,7 @@ mach_exception_thread (void *arg) } static void -macosx_register_exception_handler () +macosx_register_exception_handler (void) { mach_port_t task; pthread_attr_t attr; @@ -201,6 +210,8 @@ macosx_register_exception_handler () /* This is #define'd by Boehm GC to _GC_dlopen. */ #undef dlopen +void* dlopen(const char* path, int mode); + void mono_runtime_install_handlers (void) { @@ -296,16 +307,15 @@ mono_thread_state_init_from_handle (MonoThreadUnwindState *tctx, MonoNativeThrea mono_sigctx_to_monoctx (&ctx, &tctx->ctx); - domain_key = mono_domain_get_tls_offset (); + domain_key = mono_domain_get_tls_key (); jit_key = mono_get_jit_tls_key (); jit_tls = mono_mach_arch_get_tls_value_from_thread (thread_id, jit_key); domain = mono_mach_arch_get_tls_value_from_thread (thread_id, domain_key); /*Thread already started to cleanup, can no longer capture unwind state*/ - if (!jit_tls) + if (!jit_tls || !domain) return FALSE; - g_assert (domain); #if defined (MONO_ARCH_ENABLE_MONO_LMF_VAR) lmf_key = mono_get_lmf_tls_offset ();