From: Ivan Maidanski Date: Fri, 30 Nov 2012 04:08:20 +0000 (+0400) Subject: Allow pthread_kill error code logging in GC_suspend/resume (debugging) X-Git-Tag: gc7_4_0~136 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b805f60424e35e0b175a398c99c7cd50ed933993;p=gc Allow pthread_kill error code logging in GC_suspend/resume (debugging) * pthread_stop_world.c (GC_suspend_all, GC_start_world): Log pthread_kill error code on failure if DEBUG_THREADS. --- diff --git a/pthread_stop_world.c b/pthread_stop_world.c index cbae189c..a06ffb71 100644 --- a/pthread_stop_world.c +++ b/pthread_stop_world.c @@ -493,6 +493,10 @@ STATIC int GC_suspend_all(void) case 0: break; default: +# ifdef DEBUG_THREADS + GC_log_printf("pthread_kill failed at suspend," + " errcode=%d\n", result); +# endif ABORT("pthread_kill failed"); } # endif @@ -816,6 +820,10 @@ GC_INNER void GC_start_world(void) case 0: break; default: +# ifdef DEBUG_THREADS + GC_log_printf("pthread_kill failed at resume," + " errcode=%d\n", result); +# endif ABORT("pthread_kill failed"); } # endif