UNLOCK();
}
-#if defined(GC_DARWIN_THREADS) || defined(GC_WIN32_THREADS)
+#if defined(GC_DARWIN_THREADS) || defined(GC_OPENBSD_THREADS) \
+ || defined(GC_WIN32_THREADS) || (defined(NACL) && defined(THREADS))
+ /* GC does not use signals to suspend and restart threads. */
GC_API int GC_CALL GC_get_suspend_signal(void)
{
- return -1; /* GC does not use signals to suspend threads. */
+ return -1;
}
GC_API int GC_CALL GC_get_thr_restart_signal(void)
{
- return -1; /* GC does not use signals to restart threads. */
+ return -1;
}
-#endif /* GC_DARWIN_THREADS || GC_WIN32_THREADS */
+#endif /* GC_DARWIN_THREADS || GC_WIN32_THREADS || ... */
#if !defined(_MAX_PATH) && (defined(MSWIN32) || defined(MSWINCE) \
|| defined(CYGWIN32))
STATIC int GC_sig_suspend = SIG_SUSPEND;
STATIC int GC_sig_thr_restart = SIG_THR_RESTART;
+GC_API int GC_CALL GC_get_suspend_signal(void)
+{
+ return GC_sig_suspend;
+}
+
+GC_API int GC_CALL GC_get_thr_restart_signal(void)
+{
+ return GC_sig_thr_restart;
+}
+
#ifdef GC_EXPLICIT_SIGNALS_UNBLOCK
/* Some targets (eg., Solaris) might require this to be called when */
/* doing thread registering from the thread destructor. */
# endif /* !GC_OPENBSD_THREADS && !NACL */
}
-GC_API int GC_CALL GC_get_suspend_signal(void)
-{
-# if !defined(GC_OPENBSD_THREADS) && !defined(NACL)
- return GC_sig_suspend;
-# else
- return -1;
-# endif
-}
-
-GC_API int GC_CALL GC_get_thr_restart_signal(void)
-{
-# if !defined(GC_OPENBSD_THREADS) && !defined(NACL)
- return GC_sig_thr_restart;
-# else
- return -1;
-# endif
-}
-
#endif /* GC_PTHREADS && !GC_DARWIN_THREADS && !GC_WIN32_THREADS */