-
Notifications
You must be signed in to change notification settings - Fork 408
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Acknowledge thread restart from suspend_handler (NetBSD)
Issue #181 (bdwgc). Also, one sem_t variable is used to acknowledge both thread suspends and restarts. * pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL] (GC_suspend_ack_sem): Add comment. * pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL && GC_NETBSD_THREADS_WORKAROUND] (GC_restart_ack_sem): Remove static variable. * pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL && GC_NETBSD_THREADS_WORKAROUND] (GC_suspend_handler_inner): Call sem_post(&GC_suspend_ack_sem) at the end of the handler (just before RESTORE_CANCEL). * pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL] (suspend_restart_barrier): New static function. * pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL && GC_NETBSD_THREADS_WORKAROUND] (GC_restart_handler): Do not call sem_post(&GC_restart_ack_sem). * pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL] (GC_stop_world): Remove i, code local variables; call suspend_restart_barrier instead of sem_wait calls in a loop. * pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL && GC_NETBSD_THREADS_WORKAROUND] (GC_start_world): Likewise. * pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL && GC_NETBSD_THREADS_WORKAROUND] (GC_stop_init): Remove sem_init(&GC_restart_ack_sem) call.
- Loading branch information
Showing
1 changed file
with
22 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters