Allow GC_NETBSD_THREADS_WORKAROUND macro manual definition
authorIvan Maidanski <ivmai@mail.ru>
Thu, 28 Dec 2017 07:48:28 +0000 (10:48 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 28 Dec 2017 07:51:41 +0000 (10:51 +0300)
* include/private/gcconfig.h [GC_NETBSD_THREADS]
(GC_NETBSD_THREADS_WORKAROUND): Define; copy comment from
pthread_stop_world.c.
* pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL
&& GC_NETBSD_THREADS] (GC_NETBSD_THREADS_WORKAROUND): Remove.
* pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL]
(GC_restart_ack_sem): Define only if GC_NETBSD_THREADS_WORKAROUND.

include/private/gcconfig.h
pthread_stop_world.c

index dd84949..05205e5 100644 (file)
 #ifdef GC_NETBSD_THREADS
 # define SIGRTMIN 33
 # define SIGRTMAX 63
+  /* It seems to be necessary to wait until threads have restarted.     */
+  /* But it is unclear why that is the case.                            */
+# define GC_NETBSD_THREADS_WORKAROUND
 #endif
 
 #ifdef GC_OPENBSD_THREADS
index e5d8088..781c23b 100644 (file)
@@ -205,10 +205,8 @@ GC_API int GC_CALL GC_get_thr_restart_signal(void)
 
 STATIC sem_t GC_suspend_ack_sem;
 
-#ifdef GC_NETBSD_THREADS
-# define GC_NETBSD_THREADS_WORKAROUND
-  /* It seems to be necessary to wait until threads have restarted.     */
-  /* But it is unclear why that is the case.                            */
+#ifdef GC_NETBSD_THREADS_WORKAROUND
+  /* In case of it is necessary to wait until threads have restarted.   */
   STATIC sem_t GC_restart_ack_sem;
 #endif