summaryrefslogtreecommitdiff
path: root/pthread_stop_world.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2022-04-10 13:23:00 +0300
committerIvan Maidanski <ivmai@mail.ru>2022-04-11 20:58:33 +0300
commit34d820059a47e62e728506125fb93fd037712b45 (patch)
treedb76f01b0361404355afd2643f49c808f91457d4 /pthread_stop_world.c
parent244646878d5a8be923229318615d1f12b090f9f0 (diff)
downloadbdwgc-34d820059a47e62e728506125fb93fd037712b45.tar.gz
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.
Diffstat (limited to 'pthread_stop_world.c')
-rw-r--r--pthread_stop_world.c8
1 files changed, 4 insertions, 4 deletions
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) {