Fix deadlock in GC_suspend_thread when thread is rebuilding free list
authorIvan Maidanski <ivmai@mail.ru>
Fri, 21 Jul 2017 17:27:12 +0000 (20:27 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 21 Jul 2017 17:27:12 +0000 (20:27 +0300)
commitfc9dd4b7068180c736319d202251dfcefd88ff36
tree8d71305150313c1ff8a708d56ab999576bdf9dcc
parent0f28c676779f12eaed2f86f961098cd5ce212c75
Fix deadlock in GC_suspend_thread when thread is rebuilding free list
(fix commits 62097c3, 59e2bcf)

* pthread_stop_world.c [GC_ENABLE_SUSPEND_THREAD] (GC_suspend_thread):
Move DISABLE_CANCEL() upper to cover also GC_wait_for_reclaim() and
RAISE_SIGNAL() calls.
* pthread_stop_world.c [GC_ENABLE_SUSPEND_THREAD && PARALLEL_MARK]
(GC_suspend_thread): If GC_parallel then call GC_wait_for_reclaim()
holding the allocation lock before RAISE_SIGNAL() call; add comment.
pthread_stop_world.c