From b805f60424e35e0b175a398c99c7cd50ed933993 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 30 Nov 2012 08:08:20 +0400 Subject: [PATCH] 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. --- pthread_stop_world.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pthread_stop_world.c b/pthread_stop_world.c index cbae189..a06ffb7 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 -- 2.7.4