Really prevent hang in sem_wait in stop_world if compiled with TSan
authorIvan Maidanski <ivmai@mail.ru>
Tue, 12 Dec 2017 16:56:28 +0000 (19:56 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 12 Dec 2017 16:56:28 +0000 (19:56 +0300)
commitebc872b55629efb4be570aec8f89c323b567a2e9
tree2f967ee9277cc730b76213500310adb909faa64c
parent029d894d7fa9c511b68d9d85c266d2791d35dd19
Really prevent hang in sem_wait in stop_world if compiled with TSan
(fix commit af409e4)

Issue #181 (bdwgc).

* pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL
&& THREAD_SANITIZER] (GC_retry_signals): Initialize to TRUE.
* pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL]
(GC_store_stack_ptr): Update comment.
* pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL
&& GC_ENABLE_SUSPEND_THREAD] (GC_suspend_thread): Likewise.
* pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL
&& THREAD_SANITIZER] (GC_stop_world): Do not use sem_trywait+sleep
workaround (not needed if GC_retry_signals).
pthread_stop_world.c