Fix GC_get_thr_restart_signal for OpenBSD and NaCl
authorIvan Maidanski <ivmai@mail.ru>
Mon, 19 Dec 2011 12:05:39 +0000 (16:05 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 19 Dec 2011 12:05:39 +0000 (16:05 +0400)
* include/gc.h (GC_get_thr_restart_signal): Refine comment.
* pthread_stop_world.c (GC_get_thr_restart_signal): Return -1 for
OpenBSD and NaCl.

include/gc.h
pthread_stop_world.c

index d7aae6b..a7fd449 100644 (file)
@@ -1083,7 +1083,7 @@ GC_API void * GC_CALL GC_call_with_stack_base(GC_stack_base_func /* fn */,
   GC_API int GC_CALL GC_get_suspend_signal(void);
 
   /* Return the signal number (constant) used by the garbage collector  */
-  /* to restart threads on POSIX systems.  Return -1 otherwise.         */
+  /* to restart (resume) threads on POSIX systems. Return -1 otherwise. */
   GC_API int GC_CALL GC_get_thr_restart_signal(void);
 
   /* Explicitly enable GC_register_my_thread() invocation.              */
index f71dbca..edbed2b 100644 (file)
@@ -874,7 +874,11 @@ GC_INNER void GC_stop_init(void)
 
   GC_API int GC_CALL GC_get_thr_restart_signal(void)
   {
+#   if !defined(GC_OPENBSD_THREADS) && !defined(NACL)
       return SIG_THR_RESTART;
+#   else
+      return -1;
+#   endif
   }
 
 #else /* defined(GC_PTHREADS) && !defined(GC_WIN32_THREADS) && \