-
Notifications
You must be signed in to change notification settings - Fork 393
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Turn on handle fork by default on Darwin (multi-threaded only)
Issue #103 (bdwgc). Remove mutual exclusion between fork handling and GC incremental mode on Darwin in a multi-threaded configuration. Note: the incremental mode is turned off in the child process after fork, for now. * CMakeLists.txt [enable_threads && CMAKE_USE_PTHREADS_INIT && !WIN32 && enable_handle_fork && !disable_handle_fork] (HANDLE_FORK): Define C macro even if APPLE; remove comment. * configure.ac [$enable_handle_fork!=yes && $enable_handle_fork!=no && $enable_handle_fork!=manual && $THREADS==posix && $host==*-*-darwin*] (HANDLE_FORK): Define AC macro; remove comment. * tests/gctest.c [DARWIN && MPROTECT_VDB && !MAKE_BACK_GRAPH && !TEST_HANDLE_FORK && !NO_TEST_HANDLE_FORK] (NO_TEST_HANDLE_FORK): Do not define if THREADS. * include/private/gc_priv.h [CAN_HANDLE_FORK && MPROTECT_VDB && GC_DARWIN_THREADS] (GC_dirty_update_child): Declare as function (instead of a no-op macro). * pthread_support.c [CAN_HANDLE_FORK && !GC_DISABLE_INCREMENTAL] (fork_child_proc): Move GC_dirty_update_child() call upper to be right after GC_release_dirty_lock() one. * pthread_support.c [CAN_HANDLE_FORK && GC_DARWIN_THREADS && MPROTECT_VDB] (GC_atfork_prepare): Remove assertion (about GC_handle_fork) and abort. * os_dep.c [DARWIN && MPROTECT_VDB && CAN_HANDLE_FORK && THREADS] (GC_dirty_update_child): Implement (unprotect the entire heap, restore the old task exception ports and turn off the incremental mode). * os_dep.c [DARWIN && MPROTECT_VDB && THREADS] (GC_mprotect_thread): Reformat code. * os_dep.c [DARWIN && MPROTECT_VDB && CAN_HANDLE_FORK] (GC_dirty_init): Do not WARN and return FALSE if THREADS and GC_handle_fork; add assertion that me variable is non-zero. * os_dep.c [DARWIN && MPROTECT_VDB] (GC_forward_exception): Cast 1 to exception_mask_t before left-shift by exception; reformat code.
- Loading branch information
Showing
6 changed files
with
71 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters