summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2012-02-20 18:51:21 +0100
committerIvan Maidanski <ivmai@mail.ru>2012-02-21 18:34:42 +0100
commit0ba0d226263968ca7021f55a8c7a6726ff8d586f (patch)
tree5384892849fab1b8de1fe4a3e3088c46b5f03895 /include
parentbb55ce8b45b5269464e550071c848eee9b29eb24 (diff)
Fix gcconfig to turn on POSIX fork() support by default
(define HANDLE_FORK on Unix platforms with pthreads) * doc/README.macros (HANDLE_FORK): Replace with NO_HANDLE_FORK; update the documentation. * include/private/gcconfig.h (HANDLE_FORK): Explicitly define if GC_PTHREADS unless already defined or NO_HANDLE_FORK is defined, or unsupported on the target.
Diffstat (limited to 'include')
-rw-r--r--include/private/gcconfig.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h
index 310afdf..3ab7156 100644
--- a/include/private/gcconfig.h
+++ b/include/private/gcconfig.h
@@ -2591,6 +2591,14 @@
# define IF_CANCEL(x) /* empty */
#endif
+#if defined(GC_PTHREADS) && !defined(GC_WIN32_THREADS) \
+ && !defined(HANDLE_FORK) && !defined(NO_HANDLE_FORK) \
+ && !defined(HURD) && !defined(NACL) && !defined(PLATFORM_ANDROID)
+ /* Attempts (where supported) to make GC_malloc work in a child */
+ /* process fork'ed from a multi-threaded parent. */
+# define HANDLE_FORK
+#endif
+
#if !defined(USE_MARK_BITS) && !defined(USE_MARK_BYTES) \
&& defined(PARALLEL_MARK)
/* Minimize compare-and-swap usage. */