X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fmini-posix.c;h=7be84488f5877f979e259857c2383e12c373d542;hb=ef0ddf45c3081e799edcb4e95770186514b80cf1;hp=1acee9adb16664099e5a8e2519022186b1365206;hpb=6f9822ed9d755ed912fbe3188702917a16b132ad;p=mono.git diff --git a/mono/mini/mini-posix.c b/mono/mini/mini-posix.c index 1acee9adb16..7be84488f58 100644 --- a/mono/mini/mini-posix.c +++ b/mono/mini/mini-posix.c @@ -9,6 +9,7 @@ * Copyright 2011 Xamarin, Inc (http://www.xamarin.com) * * See LICENSE for licensing information. + * Licensed under the MIT license. See LICENSE file in the project root for full license information. */ #include #include @@ -326,7 +327,6 @@ per_thread_profiler_hit (void *ctx) MONO_SIG_HANDLER_FUNC (static, sigprof_signal_handler) { - MonoThreadInfo *info; int old_errno = errno; int hp_save_index; MONO_SIG_HANDLER_GET_CONTEXT; @@ -342,12 +342,13 @@ MONO_SIG_HANDLER_FUNC (static, sigprof_signal_handler) /* If we can't consume a profiling request it means we're the initiator. */ if (!(mono_threads_consume_async_jobs () & MONO_SERVICE_REQUEST_SAMPLE)) { FOREACH_THREAD_SAFE (info) { - if (mono_thread_info_get_tid (info) == mono_native_thread_id_get ()) + if (mono_thread_info_get_tid (info) == mono_native_thread_id_get () || + !mono_thread_info_is_live (info)) continue; mono_threads_add_async_job (info, MONO_SERVICE_REQUEST_SAMPLE); mono_threads_pthread_kill (info, profiling_signal_in_use); - } END_FOREACH_THREAD_SAFE; + } FOREACH_THREAD_SAFE_END } mono_thread_info_set_is_async_context (TRUE);