summaryrefslogtreecommitdiff
path: root/pthread_support.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 /pthread_support.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 'pthread_support.c')
-rw-r--r--pthread_support.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/pthread_support.c b/pthread_support.c
index 41234ab..652e4a7 100644
--- a/pthread_support.c
+++ b/pthread_support.c
@@ -846,14 +846,6 @@ STATIC void GC_fork_prepare_proc(void)
/* Wait for an ongoing GC to finish, since we can't finish it in */
/* the (one remaining thread in) the child. */
LOCK();
-# if defined(GC_DARWIN_THREADS) && defined(MPROTECT_VDB)
- if (GC_dirty_maintained) {
- WARN("GC incremental mode is incompatible with fork() for now\n", 0);
- /* Currently, it is not allowed to use any GC allocated data */
- /* or call any GC function in the child (before exec). */
- /* FIXME: Remove warning when mode implemented in child_proc. */
- }
-# endif
DISABLE_CANCEL(fork_cancel_state);
/* Following waits may include cancellation points. */
# if defined(PARALLEL_MARK)
@@ -886,11 +878,6 @@ STATIC void GC_fork_child_proc(void)
if (GC_parallel)
GC_release_mark_lock();
# endif
-# if defined(GC_DARWIN_THREADS) && defined(MPROTECT_VDB)
- /* FIXME: Since GC_mprotect_thread is not running in the child, */
- /* GC_dirty_maintained should be switched off gracefully */
- /* (unprotecting all pages and clearing GC_mach_handler_thread). */
-# endif
GC_remove_all_threads_but_me();
# ifdef PARALLEL_MARK
/* Turn off parallel marking in the child, since we are probably */