summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2012-07-04 19:59:34 +0400
committerIvan Maidanski <ivmai@mail.ru>2012-07-04 19:59:34 +0400
commit06d9d8cdff83489eefacdb518d1851408f7f4081 (patch)
treeca527dadf8fcce0c6c20b74e54c79b5ec71c8675 /misc.c
parent05daaeea173b81102e81ceac932a720f9359bf76 (diff)
downloadbdwgc-06d9d8cdff83489eefacdb518d1851408f7f4081.tar.gz
Move GC_get_suspend/thr_restart_signal to misc.c for NaCl and OpenBSD
* misc.c (GC_get_suspend_signal, GC_get_thr_restart_signal): Define also for OpenBSD and NaCl targets in this file (always returns -1). * pthread_stop_world.c (GC_get_suspend_signal, GC_get_thr_restart_signal): Move function definition up to the definition of GC_sig_suspend and GC_sig_thr_restart variables (i.e., define function only if not OpenBSD and not NaCl target in this file).
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/misc.c b/misc.c
index 70203978..e3c3478c 100644
--- a/misc.c
+++ b/misc.c
@@ -507,17 +507,19 @@ GC_API void GC_CALL GC_get_heap_usage_safe(GC_word *pheap_size,
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))