summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2012-04-02 20:31:22 +0200
committerIvan Maidanski <ivmai@mail.ru>2012-04-03 06:15:54 +0200
commitcad34343056a5f9b4598b5ddc36ed8ce0e264399 (patch)
treeb0e0408635970f85a7584372ad6557449c1122f4 /misc.c
parent1555aa8dd31db657c0ad5eed618757157783c2e5 (diff)
FIX: Disable incremental mode on Darwin if fork handling requested
* 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).
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/misc.c b/misc.c
index fac069a..5267998 100644
--- a/misc.c
+++ b/misc.c
@@ -169,10 +169,11 @@ GC_API void GC_CALL GC_set_handle_fork(int value)
# ifdef CAN_HANDLE_FORK
if (!GC_is_initialized)
GC_handle_fork = (GC_bool)value;
-# elif defined(THREADS)
- /* FIXME: Handle Darwin case. */
+# elif defined(THREADS) || (defined(DARWIN) && defined(MPROTECT_VDB))
if (!GC_is_initialized && value)
ABORT("fork() handling disabled");
+# else
+ /* No at-fork handler is needed in the single-threaded mode. */
# endif
}