From: Ivan Maidanski Date: Tue, 3 Apr 2012 04:37:33 +0000 (+0400) Subject: Regenerate configure; update ChangeLog X-Git-Tag: gc7_2~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c20772b400213da4a2776319740cb851487c4ed0;p=gc Regenerate configure; update ChangeLog --- diff --git a/ChangeLog b/ChangeLog index b1f10cc8..0e16acfc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,69 @@ +2012-04-02 Ivan Maidanski + + * configure: Regenerate. + * include/private/config.h.in : Likewise. + +2012-04-02 Ivan Maidanski + + * doc/README.macros (NO_HANDLE_FORK): Replace back with HANDLE_FORK + and update. + * include/private/gcconfig.h (CAN_HANDLE_FORK): Define also for Darwin + in case of MPROTECT_VDB. + * misc.c (GC_set_handle_fork): Handle Darwin properly; add comment. + * os_dep.c (GC_dirty_init): Do not turn on GC_dirty_maintained for + Darwin if GC_handle_fork is on; add comment; remove FIXME. + * pthread_support.c (GC_fork_prepare_proc): Remove WARN for Darwin + (since GC_dirty_maintained is off in that case). + * pthread_support.c (GC_fork_child_proc): Remove comment (for Darwin). + +2012-04-02 Ivan Maidanski + + * 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. + +2012-02-20 Ivan Maidanski + + * pthread_support.c (GC_thr_init): Abort on pthread_atfork failure + (only if HANDLE_FORK). + +2012-03-30 Ivan Maidanski + + * include/gc.h (GC_HAVE_GET_HEAP_USAGE_SAFE): Remove public HAVE_ + macro (since function availability could be determined by autotools); + update the comment. + +2012-03-27 Andy Wingo + + * configure.ac: Add --enable-handle-fork option; if explicitly passed, + enables or disables the pthread_atfork support; if not passed, the + default, as determined by gcconfig.h, is to enable HANDLE_FORK if it + is supported on the target platform. + 2012-03-28 Ivan Maidanski * doc/README.solaris2 (SOLARIS THREADS): Update. diff --git a/configure b/configure index 5c86de29..92eabdb1 100755 --- a/configure +++ b/configure @@ -809,6 +809,7 @@ enable_java_finalization enable_atomic_uncollectable enable_redirect_malloc enable_large_config +enable_handle_fork enable_gc_assertions enable_munmap with_libatomic_ops @@ -1473,6 +1474,8 @@ Optional Features: --enable-redirect-malloc Redirect malloc and friends to GC routines --enable-large-config Optimize for large (> 100 MB) heap or root set + --enable-handle-fork Attempt to ensure a usable collector after fork() in + multi-threaded programs. --enable-gc-assertions collector-internal assertion checking --enable-munmap=N return page to the os if empty for N collections @@ -16410,6 +16413,22 @@ $as_echo "#define LARGE_CONFIG 1" >>confdefs.h fi +# Check whether --enable-handle-fork was given. +if test "${enable_handle_fork+set}" = set; then : + enableval=$enable_handle_fork; +fi + + +if test "${enable_handle_fork}" = yes; then + +$as_echo "#define HANDLE_FORK 1" >>confdefs.h + +elif test "${enable_handle_fork}" = no; then + +$as_echo "#define NO_HANDLE_FORK 1" >>confdefs.h + +fi + if test -n "${with_cross_host}"; then $as_echo "#define NO_CLOCK 1" >>confdefs.h diff --git a/include/private/config.h.in b/include/private/config.h.in index 61605d3e..fb354756 100644 --- a/include/private/config.h.in +++ b/include/private/config.h.in @@ -93,6 +93,9 @@ /* Define to support Win32 threads. */ #undef GC_WIN32_THREADS +/* Define to install pthread_atfork() handlers by default. */ +#undef HANDLE_FORK + /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H @@ -151,6 +154,9 @@ /* Define to make the collector not allocate executable memory by default. */ #undef NO_EXECUTE_PERMISSION +/* Prohibit installation of pthread_atfork() handlers. */ +#undef NO_HANDLE_FORK + /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O