From: Ivan Maidanski Date: Thu, 28 Dec 2017 07:48:28 +0000 (+0300) Subject: Allow GC_NETBSD_THREADS_WORKAROUND macro manual definition X-Git-Tag: v8.0.0~437 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=76176b6fcc163545e1be38f83b42e82e1ae37f1f;p=platform%2Fupstream%2Flibgc.git Allow GC_NETBSD_THREADS_WORKAROUND macro manual definition * 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. --- diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index dd84949..05205e5 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -2755,6 +2755,9 @@ #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 diff --git a/pthread_stop_world.c b/pthread_stop_world.c index e5d8088..781c23b 100644 --- a/pthread_stop_world.c +++ b/pthread_stop_world.c @@ -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