From: Ivan Maidanski Date: Mon, 19 Dec 2011 12:05:39 +0000 (+0400) Subject: Fix GC_get_thr_restart_signal for OpenBSD and NaCl X-Git-Tag: gc7_3alpha2~285^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=670a7ee591f0eca75ff33ed3f5e28e974028c5c0;p=platform%2Fupstream%2Flibgc.git Fix GC_get_thr_restart_signal for OpenBSD and NaCl * 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. --- diff --git a/include/gc.h b/include/gc.h index d7aae6b..a7fd449 100644 --- a/include/gc.h +++ b/include/gc.h @@ -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. */ diff --git a/pthread_stop_world.c b/pthread_stop_world.c index f71dbca..edbed2b 100644 --- a/pthread_stop_world.c +++ b/pthread_stop_world.c @@ -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) && \