From 34d820059a47e62e728506125fb93fd037712b45 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Sun, 10 Apr 2022 13:23:00 +0300 Subject: Add GC_ prefix to suspend_self_inner (fix of commit 1ae3d0fbb) * include/private/pthread_stop_world.h [GC_ENABLE_SUSPEND_THREAD && SIGNAL_BASED_STOP_WORLD] (suspend_self_inner): Rename to GC_suspend_self_inner; rename client_data argument to thread_me. * pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL && GC_ENABLE_SUSPEND_THREAD] (suspend_self_inner): Likewise. * pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL && GC_ENABLE_SUSPEND_THREAD] (GC_suspend_handler_inner, GC_suspend_thread): Rename suspend_self_inner to GC_suspend_self_inner. * pthread_support.c [GC_ENABLE_SUSPEND_THREAD && SIGNAL_BASED_STOP_WORLD] (GC_register_my_thread): Likewise. * pthread_support.c [GC_ENABLE_SUSPEND_THREAD && SIGNAL_BASED_STOP_WORLD] (GC_register_my_thread): Remove misleading comment. --- pthread_stop_world.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pthread_stop_world.c') diff --git a/pthread_stop_world.c b/pthread_stop_world.c index 33470e62..7713da9d 100644 --- a/pthread_stop_world.c +++ b/pthread_stop_world.c @@ -362,7 +362,7 @@ STATIC void GC_suspend_handler_inner(ptr_t dummy GC_ATTR_UNUSED, me -> backing_store_ptr = bs_lo + stack_size; # endif sem_post(&GC_suspend_ack_sem); - suspend_self_inner(me); + GC_suspend_self_inner(me); # ifdef DEBUG_THREADS GC_log_printf("Continuing %p on GC_resume_thread\n", (void *)self); # endif @@ -625,8 +625,8 @@ STATIC void GC_restart_handler(int sig) (void)select(0, 0, 0, 0, &tv); } - GC_INNER void *GC_CALLBACK suspend_self_inner(void *client_data) { - GC_thread me = (GC_thread)client_data; + GC_INNER void *GC_CALLBACK GC_suspend_self_inner(void *thread_me) { + GC_thread me = (GC_thread)thread_me; while (ao_load_acquire_async(&me->suspended_ext)) { /* TODO: Use sigsuspend() instead. */ @@ -653,7 +653,7 @@ STATIC void GC_restart_handler(int sig) UNLOCK(); /* It is safe as "t" cannot become invalid here (no race with */ /* GC_unregister_my_thread). */ - (void)GC_do_blocking(suspend_self_inner, t); + (void)GC_do_blocking(GC_suspend_self_inner, t); return; } if ((t -> flags & FINISHED) != 0) { -- cgit v1.2.1