]> granicus.if.org Git - gc/commitdiff
Allow pthread_kill error code logging in GC_suspend/resume (debugging)
authorIvan Maidanski <ivmai@mail.ru>
Fri, 30 Nov 2012 04:08:20 +0000 (08:08 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 30 Nov 2012 11:08:57 +0000 (15:08 +0400)
* pthread_stop_world.c (GC_suspend_all, GC_start_world): Log
pthread_kill error code on failure if DEBUG_THREADS.

pthread_stop_world.c

index cbae189caf4c28e83132412ada360d6150e52e18..a06ffb71cc815cc63e47066fa526d410fdbd5af7 100644 (file)
@@ -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