path: root/os_dep.c
diff options
authorivmai <ivmai>2010-10-22 07:47:47 +0200
committerIvan Maidanski <>2011-07-26 19:06:55 +0200
commit174c1de6e93ac6308dca45063564e175f280d16a (patch)
treea279bdda159aca36eea58c7b431699f7600383e5 /os_dep.c
parent51e969ce8077d27fd0492e7220c2838747a3f3a5 (diff)
2010-10-22 Ivan Maidanski <>
* CMakeLists.txt: Check enable_parallel_mark on Darwin. * Ditto. * darwin_stop_world.c (DARWIN_SUSPEND_GC_THREADS, DARWIN_QUERY_TASK_THREADS): Rename to GC_NO_THREADS_DISCOVERY and GC_DISCOVER_TASK_THREADS, respectively. * os_dep.c (DARWIN_SUSPEND_GC_THREADS): Ditto. * pthread_support.c (DARWIN_SUSPEND_GC_THREADS): Ditto. * darwin_stop_world.c (DARWIN_QUERY_TASK_THREADS): Don't define (and remove FIXME). * darwin_stop_world.c (GC_use_threads_discovery): Add GC_API; comment; remove FIXME. * win32_threads.c (GC_NO_DLLMAIN): Rename to GC_NO_THREADS_DISCOVERY. * tests/test.c (GC_NO_DLLMAIN): Ditto. * doc/README.macros (GC_NO_DLLMAIN): Ditto. * doc/README.win32 (GC_NO_DLLMAIN): Ditto. * doc/README.macros (GC_NO_THREADS_DISCOVERY): Update the comment. * win32_threads.c (GC_win32_dll_threads): Define as macro to true if GC_DISCOVER_TASK_THREADS (and not GC_NO_THREADS_DISCOVERY); update the comment. * win32_threads.c (GC_use_DllMain): Rename to GC_use_threads_discovery; do not set GC_win32_dll_threads if GC_DISCOVER_TASK_THREADS. * win32_threads.c (GC_started_thread_while_stopped, GC_lookup_thread_inner, UNPROTECT_THREAD, GC_lookup_pthread, GC_thr_init, GC_pthread_create, DllMain): Rewrite some expressions which use GC_win32_dll_threads to minimize the possibility of an "unreachable code" compiler warning when GC_win32_dll_threads is defined as a macro. * win32_threads.c (GC_unregister_my_thread): Don't call GC_delete_thread() if GC_win32_dll_threads and THREAD_LOCAL_ALLOC (since can't happen); use "t" local variable only if not GC_win32_dll_threads. * win32_threads.c (GC_register_my_thread_inner): Reformat the comment. * doc/README.macros (GC_DISCOVER_TASK_THREADS): Document. * include/gc.h (GC_use_DllMain): Rename to GC_use_threads_discovery but keep old name as a macro definition. * include/gc.h (GC_use_threads_discovery): Declare also for Darwin; update the comment. * tests/test.c (main): Call GC_use_threads_discovery for Darwin (to test the mode if possible). * configure: Regenerate.
Diffstat (limited to 'os_dep.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/os_dep.c b/os_dep.c
index 6bbba1b..becafcc 100644
--- a/os_dep.c
+++ b/os_dep.c
@@ -3886,7 +3886,7 @@ GC_INNER void GC_mprotect_resume(void)
GC_INNER void GC_darwin_register_mach_handler_thread(mach_port_t thread);
# endif
@@ -3912,7 +3912,7 @@ STATIC void *GC_mprotect_thread(void *arg)
} msg;
mach_msg_id_t id;
-# if defined(THREADS) && !defined(DARWIN_SUSPEND_GC_THREADS)
+# if defined(THREADS) && !defined(GC_NO_THREADS_DISCOVERY)
# endif