]> granicus.if.org Git - gc/commit
Minimize delay between sem_post and sigsuspend in suspend_handler if TSan
authorIvan Maidanski <ivmai@mail.ru>
Thu, 29 Mar 2018 06:54:39 +0000 (09:54 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 29 Mar 2018 06:55:00 +0000 (09:55 +0300)
commitb9fbd1f588beb1a02e4a36cc57e48a4013836086
tree17a1b7497b1f08e4778a2b37dd9b26715b42d92d
parent686a667317ed5e425bcaecf18d4929911cf1504d
Minimize delay between sem_post and sigsuspend in suspend_handler if TSan
(fix of commit af409e4)

Issue #181 (bdwgc).

This change is to do as less as possible (even in case of TSan usage)
between the sem_post and sigsuspend calls in GC_suspend_handler_inner
(to match the relevant comment after sigsuspend call).

* pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL
&& THREAD_SANITIZER] (GC_suspend_handler_inner): Move sigemptyset()
and pthread_sigmask() calls to be just before sem_post() call.
pthread_stop_world.c