summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2012-04-02 20:18:12 +0400
committerIvan Maidanski <ivmai@mail.ru>2012-04-02 21:08:22 +0400
commit1e882b98c2cf9479a9cd08a67439dab7f9622924 (patch)
tree221d3ad18d1c4bd23017ac4c6a18d3a7b4124b11 /configure.ac
parent5e7c83290c107f218b615e21f00e93ca25e1f053 (diff)
downloadbdwgc-1e882b98c2cf9479a9cd08a67439dab7f9622924.tar.gz
Add public GC_set_handle_fork to control forked child handling support
* include/gc.h (GC_set_handle_fork): New API function. * misc.c (GC_set_handle_fork): Likewise. * include/private/gc_priv.h (GC_handle_fork): New internal variable declaration (only if CAN_HANDLE_FORK). * misc.c (GC_handle_fork): New internal variable (defined only if CAN_HANDLE_FORK); initialize to TRUE if HANDLE_FORK. * include/private/gcconfig.h (HANDLE_FORK): Replace with CAN_HANDLE_FORK. * pthread_support.c (HANDLE_FORK): Likewise. * win32_threads.c (HANDLE_FORK): Likewise. * include/private/gcconfig.h (CAN_HANDLE_FORK): Always define macro if HANDLE_FORK. * pthread_support.c (GC_thr_init): Replace HANDLE_FORK with CAN_HANDLE_FORK; call pthread_atfork only if GC_handle_fork; update the comment. * win32_threads.c (GC_thr_init): Likewise. * tests/test.c (NO_TEST_HANDLE_FORK): Define new macro if fork handling is not supported (or is a no-op) on the target. * tests/test.c (INIT_FORK_SUPPORT): New macro (invoke GC_set_handle_fork unless NO_TEST_HANDLE_FORK). * tests/test.c (GC_OPT_INIT): New macro (defined to GC_INIT or empty). * tests/test.c (GC_COND_INIT): Use INIT_FORK_SUPPORT and GC_OPT_INIT. * tests/test.c (run_one_test): Test NO_TEST_HANDLE_FORK (instead of target-specific macros). * win32_threads.c (GC_remove_all_threads_but_me, GC_fork_prepare_proc, GC_fork_parent_proc, GC_fork_child_proc): Do not test GC_PTHREADS. * configure.ac (HANDLE_FORK, NO_HANDLE_FORK): Update message.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 2 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 93072186..b61cf814 100644
--- a/configure.ac
+++ b/configure.ac
@@ -792,10 +792,10 @@ AC_ARG_ENABLE(handle-fork,
if test "${enable_handle_fork}" = yes; then
AC_DEFINE(HANDLE_FORK, 1,
- [Define to install pthread_atfork() handlers if available.])
+ [Define to install pthread_atfork() handlers by default.])
elif test "${enable_handle_fork}" = no; then
AC_DEFINE(NO_HANDLE_FORK, 1,
- [Define to inhibit installation of pthread_atfork() handlers.])
+ [Prohibit installation of pthread_atfork() handlers.])
fi
dnl This is something of a hack. When cross-compiling we turn off