Workaround hangs in sigsuspend and sem_wait if compiled with TSan
authorIvan Maidanski <ivmai@mail.ru>
Fri, 17 Nov 2017 18:32:40 +0000 (21:32 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 17 Nov 2017 18:32:40 +0000 (21:32 +0300)
commitaf409e4bdfa25bbab911a706a9f123d98be54c23
tree0d66052d48debef0ba146600942374bc926e4b7e
parent70d0bab7e331ca50d42bab75d85174abab7e1f80
Workaround hangs in sigsuspend and sem_wait if compiled with TSan

Issue #181 (bdwgc).

* pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL
&& THREAD_SANITIZER] (GC_suspend_handler_inner): Call
pthread_sigmask(SIG_SETMASK) with an empty set (thus unmask all
signals); add comment.
* pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL
&& THREAD_SANITIZER] (GC_stop_world): Call sem_trywait() repeatedly
(with a delay of 100 microseconds) while getting EAGAIN error (instead
of a sem_wait call).
pthread_stop_world.c