diff options
Diffstat (limited to 'libgc')
-rw-r--r-- | libgc/include/gc.h | 4 | ||||
-rw-r--r-- | libgc/misc.c | 11 |
2 files changed, 15 insertions, 0 deletions
diff --git a/libgc/include/gc.h b/libgc/include/gc.h index 487727dc842..a3eb3c2dc06 100644 --- a/libgc/include/gc.h +++ b/libgc/include/gc.h @@ -429,6 +429,10 @@ GC_API size_t GC_get_total_bytes GC_PROTO((void)); /* Return -1 otherwise. */ int GC_get_suspend_signal GC_PROTO((void)); +/* Return the signal used by the gc to resume threads on posix platforms. */ +/* Return -1 otherwise. */ +int GC_get_restart_signal GC_PROTO((void)); + /* Disable garbage collection. Even GC_gcollect calls will be */ /* ineffective. */ GC_API void GC_disable GC_PROTO((void)); diff --git a/libgc/misc.c b/libgc/misc.c index 53d47c53dbc..3fa00a8b063 100644 --- a/libgc/misc.c +++ b/libgc/misc.c @@ -480,6 +480,17 @@ int GC_get_suspend_signal GC_PROTO(()) #endif } +int GC_get_restart_signal GC_PROTO(()) +{ +#if defined(SIG_THR_RESTART) && defined(GC_PTHREADS) && !defined(GC_MACOSX_THREADS) && !defined(GC_OPENBSD_THREADS) + return SIG_THR_RESTART; +#else + return -1; +#endif +} + + + GC_bool GC_is_initialized = FALSE; void GC_init() |