summaryrefslogtreecommitdiff
path: root/pthread_support.c
diff options
context:
space:
mode:
authorivmai <ivmai>2010-10-16 10:44:59 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:55 +0200
commit51e969ce8077d27fd0492e7220c2838747a3f3a5 (patch)
tree4c4d0adbb2ab08b69564d57370fc402b32cc18d5 /pthread_support.c
parentcd96e6d94fec7b53c5af5b2e85814a946448d7e3 (diff)
2010-10-16 Ivan Maidanski <ivmai@mail.ru>
* darwin_stop_world.c (DARWIN_SUSPEND_GC_THREADS, DARWIN_QUERY_TASK_THREADS): New macro recognized. * darwin_stop_world.c (GC_query_task_threads): add STATIC; initialize to false; define as macro if DARWIN_SUSPEND_GC_THREADS or DARWIN_QUERY_TASK_THREADS; remove FIXME. * darwin_stop_world.c (GC_use_threads_discovery): New function (for setting GC_query_task_threads value). * darwin_stop_world.c (GC_mach_handler_thread, GC_use_mach_handler_thread, GC_mach_thread, GC_MAX_MACH_THREADS, GC_mach_threads, GC_mach_threads_count, GC_suspend_thread_list, GC_darwin_register_mach_handler_thread): Define only if not DARWIN_SUSPEND_GC_THREADS. * darwin_stop_world.c (GC_stop_world, GC_start_world): Exclude the code for GC_query_task_threads case from compilation unless DARWIN_SUSPEND_GC_THREADS. * os_dep.c (GC_darwin_register_mach_handler_thread): Declared only if Darwin threads and not DARWIN_SUSPEND_GC_THREADS. * os_dep.c (GC_mprotect_thread): Call GC_darwin_register_mach_handler_thread only if THREADS and not DARWIN_SUSPEND_GC_THREADS. * pthread_support.c (marker_mach_threads): Don't define if DARWIN_SUSPEND_GC_THREADS. * pthread_support.c (GC_mark_thread): Don't fill in marker_mach_threads if DARWIN_SUSPEND_GC_THREADS. * include/private/gc_locks.h (GC_need_to_lock): Always declare for THREADS case.
Diffstat (limited to 'pthread_support.c')
-rw-r--r--pthread_support.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pthread_support.c b/pthread_support.c
index 5ceffb9..beb7e41 100644
--- a/pthread_support.c
+++ b/pthread_support.c
@@ -321,7 +321,7 @@ static ptr_t marker_sp[MAX_MARKERS - 1] = {0};
static ptr_t marker_bsp[MAX_MARKERS - 1] = {0};
#endif
-#ifdef GC_DARWIN_THREADS
+#if defined(GC_DARWIN_THREADS) && !defined(DARWIN_SUSPEND_GC_THREADS)
static mach_port_t marker_mach_threads[MAX_MARKERS - 1] = {0};
/* Used only by GC_suspend_thread_list(). */
@@ -348,7 +348,7 @@ STATIC void * GC_mark_thread(void * id)
# ifdef IA64
marker_bsp[(word)id] = GC_save_regs_in_stack();
# endif
-# ifdef GC_DARWIN_THREADS
+# if defined(GC_DARWIN_THREADS) && !defined(DARWIN_SUSPEND_GC_THREADS)
marker_mach_threads[(word)id] = mach_thread_self();
# endif