summaryrefslogtreecommitdiff
path: root/os_dep.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2012-02-24 08:29:48 +0100
committerIvan Maidanski <ivmai@mail.ru>2012-02-24 12:08:18 +0100
commitf5af75622d75534e34d2739d3f638c429e993691 (patch)
tree904ba4f2d5b5b16196bfd7cc711d7f3de443dc24 /os_dep.c
parent8bdc924d4ec8c482c46b720eec011ca062e6fcfd (diff)
Fix fork() handling for Darwin partially
(still not handled well for Darwin if GC incremental mode is on) * os_dep.c (GC_dirty_init): Add FIXME regarding fork (Darwin). * pthread_support.c (GC_remove_all_threads_but_me): Update mach_thread for "me" (Darwin). * pthread_support.c (GC_fork_prepare_proc): Output warning if GC_dirty_maintained (if DARWIN and MPROTECT_VDB). * pthread_support.c (GC_fork_prepare_proc, GC_fork_child_proc): Add FIXME (for Darwin). * tests/test.c (run_one_test): Do not test fork() for Darwin with incremental mode on (if HANDLE_FORK); add FIXME.
Diffstat (limited to 'os_dep.c')
-rw-r--r--os_dep.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/os_dep.c b/os_dep.c
index 26ab892..ecd2524 100644
--- a/os_dep.c
+++ b/os_dep.c
@@ -4142,6 +4142,10 @@ GC_INNER void GC_dirty_init(void)
if (pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED) != 0)
ABORT("pthread_attr_setdetachedstate failed");
+# if defined(HANDLE_FORK) && !defined(THREADS)
+ /* FIXME: See comment in GC_fork_prepare_proc. */
+# endif
+
# undef pthread_create
/* This will call the real pthread function, not our wrapper */
if (pthread_create(&thread, &attr, GC_mprotect_thread, NULL) != 0)