summaryrefslogtreecommitdiff
path: root/darwin_stop_world.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2022-10-03 08:32:11 +0300
committerIvan Maidanski <ivmai@mail.ru>2022-10-03 21:33:51 +0300
commit6babfbb56407c3da57ee41aa53fc9c25dc4506c3 (patch)
tree1508cc9a035589e70a0c3d007dcf9353180222da /darwin_stop_world.c
parent97cca6230ff1a1b6057188ae3e16a2f2d2f6d0c5 (diff)
downloadbdwgc-6babfbb56407c3da57ee41aa53fc9c25dc4506c3.tar.gz
Remove private pthread_stop_world.h and darwin_stop_world.h
(refactoring) * Makefile.direct (SRCS): Remove pthread_stop_world.h and darwin_stop_world.h items. * include/include.am (dist_noinst_HEADERS): Likewise. * darwin_stop_world.c [!GC_NO_THREADS_DISCOVERY && MPROTECT_VDB] (GC_darwin_register_mach_handler_thread): Change to no-argument GC_darwin_register_self_mach_handler(). * include/private/darwin_stop_world.h: Remove. * include/private/pthread_stop_world.h: Likewise. * include/private/gc_priv.h [GC_DARWIN_THREADS && MPROTECT_VDB] (GC_mprotect_stop, GC_mprotect_resume): Move declaration from darwin_stop_world.h. * include/private/gc_priv.h [GC_DARWIN_THREADS && MPROTECT_VDB && !GC_NO_THREADS_DISCOVERY] (GC_darwin_register_mach_handler_thread): Move declaration from darwin_stop_world.h and change to GC_darwin_register_self_mach_handler(). * include/private/pthread_support.h [GC_DARWIN_THREADS]: Move include of mach.h and thread_act.h from darwin_stop_world.h. * include/private/pthread_support.h [GC_DARWIN_THREADS]: Do not include darwin_stop_world.h. * os_dep.c [GC_DARWIN_THREADS && MPROTECT_VDB]: Likewise. * include/private/pthread_support.h [GC_DARWIN_THREADS] (thread_stop_info, GC_FindTopOfStack, GC_is_mach_marker): Move from darwin_stop_world.h. * include/private/pthread_support.h [!GC_DARWIN_THREADS && PTHREAD_STOP_WORLD_IMPL]: Do not include pthread_stop_world.h. * include/private/pthread_support.h [!GC_DARWIN_THREADS && PTHREAD_STOP_WORLD_IMPL] (thread_stop_info, GC_stop_init): Move from pthread_stop_world.h. * os_dep.c [MPROTECT_VDB && DARWIN && THREADS && !GC_NO_THREADS_DISCOVERY] (GC_mprotect_thread): Call GC_darwin_register_self_mach_handler() instead of GC_darwin_register_mach_handler_thread(mach_thread_self()).
Diffstat (limited to 'darwin_stop_world.c')
-rw-r--r--darwin_stop_world.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/darwin_stop_world.c b/darwin_stop_world.c
index 3e8ab17c..190b3c92 100644
--- a/darwin_stop_world.c
+++ b/darwin_stop_world.c
@@ -428,9 +428,9 @@ GC_INNER void GC_push_all_stacks(void)
STATIC mach_port_t GC_mach_handler_thread = 0;
STATIC GC_bool GC_use_mach_handler_thread = FALSE;
- GC_INNER void GC_darwin_register_mach_handler_thread(mach_port_t thread)
+ GC_INNER void GC_darwin_register_self_mach_handler(void)
{
- GC_mach_handler_thread = thread;
+ GC_mach_handler_thread = mach_thread_self();
GC_use_mach_handler_thread = TRUE;
}
# endif /* MPROTECT_VDB */