]> granicus.if.org Git - gc/commitdiff
Regenerate configure; update ChangeLog
authorIvan Maidanski <ivmai@mail.ru>
Tue, 3 Apr 2012 04:37:33 +0000 (08:37 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 3 Apr 2012 04:37:33 +0000 (08:37 +0400)
ChangeLog
configure
include/private/config.h.in

index b1f10cc8e633596d2895d9242f1b50ce5c68a803..0e16acfc17d796689b7dc30d8616b8f76ea2d46e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,69 @@
+2012-04-02  Ivan Maidanski <ivmai@mail.ru>
+
+       * configure: Regenerate.
+       * include/private/config.h.in : Likewise.
+
+2012-04-02  Ivan Maidanski <ivmai@mail.ru>
+
+       * 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 <ivmai@mail.ru>
+
+       * 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 <ivmai@mail.ru>
+
+       * pthread_support.c (GC_thr_init): Abort on pthread_atfork failure
+       (only if HANDLE_FORK).
+
+2012-03-30  Ivan Maidanski <ivmai@mail.ru>
+
+       * 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 <wingo@pobox.com>
+
+       * 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 <ivmai@mail.ru>
 
        * doc/README.solaris2 (SOLARIS THREADS): Update.
index 5c86de29a1fdc45d6582122b01745fc536d5f21f..92eabdb13591cb83beee69578d31670ecd75c715 100755 (executable)
--- 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
index 61605d3e02a52e14fd0cb0bbb90b58a0902a5226..fb354756e44e546ba2d5d7e452f83df5ca7c58f7 100644 (file)
@@ -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 <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
 /* 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