diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2012-07-04 19:59:34 +0400 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2012-07-04 19:59:34 +0400 |
commit | 06d9d8cdff83489eefacdb518d1851408f7f4081 (patch) | |
tree | ca527dadf8fcce0c6c20b74e54c79b5ec71c8675 /misc.c | |
parent | 05daaeea173b81102e81ceac932a720f9359bf76 (diff) | |
download | bdwgc-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.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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)) |