]> granicus.if.org Git - gc/commit
Do not resend the restart signal to threads that are already restarted
authorIvan Maidanski <ivmai@mail.ru>
Wed, 4 Apr 2018 22:40:58 +0000 (01:40 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 4 Apr 2018 22:40:58 +0000 (01:40 +0300)
commit295a2f24e2ebb39afcbc5763fecd09daa2982390
tree458dc6c9bbffa12b1655cf6e7ea50e25f81dce69
parent4aaabd82cdb689dc1e6553e5ce521d62482d0d6f
Do not resend the restart signal to threads that are already restarted
(fix of commit 3498427)

Issue #181 (bdwgc).

* pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL] (GC_stop_count):
Update comment.
* pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL]
(GC_suspend_handler_inner): Add assertion that my_stop_count is even.
* pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL]
(GC_suspend_handler_inner): Mask lowest bit of last_stop_count when
checking for the duplicate signal.
* pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL]
(GC_suspend_handler_inner): If GC_retry_signals then
set the lowest bit of last_stop_count (by AO_store_release) after the
second sem_post() call; add comment.
* pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL]
(GC_suspend_all): Add comment for last_stop_count check.
* pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL] (GC_stop_world):
Increment GC_stop_count by 2 (instead of by one).
* pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL]
(GC_restart_all): If GC_retry_signals and last_stop_count has the same
value as GC_stop_count+1 then do not increment n_live_threads and do
not send the restart signal to the thread.
pthread_stop_world.c