diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2012-11-30 08:08:20 +0400 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2012-11-30 15:08:57 +0400 |
commit | b805f60424e35e0b175a398c99c7cd50ed933993 (patch) | |
tree | 4406ed9d8590be196597171d6824ff8a35d31f0e | |
parent | 72652a088f11ee089ed780b94308436c8b9d3f9a (diff) | |
download | bdwgc-b805f60424e35e0b175a398c99c7cd50ed933993.tar.gz |
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.
-rw-r--r-- | pthread_stop_world.c | 8 |
1 files changed, 8 insertions, 0 deletions
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 |