]> granicus.if.org Git - gc/commit
Avoid busy waiting in mark_thread while GC_parallel is false
authorIvan Maidanski <ivmai@mail.ru>
Tue, 22 Aug 2017 05:56:31 +0000 (08:56 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 29 Sep 2017 20:56:06 +0000 (23:56 +0300)
commit3a2c88be6a9e0820681c8a83dba75016e0bfed38
treec8448d84bee33ceea38b61859d7f0e770f5ab3a9
parent8235b3f4fc8674c5886b058a52b89f530b9944b4
Avoid busy waiting in mark_thread while GC_parallel is false
(Cherry-pick commit 46d2a44 from 'release-7_6' branch.)

* mark.c [PARALLEL_MARK] (GC_help_marker): Add assertion that
GC_parallel is true (i.e. GC_markers_m1 is non-zero).
* pthread_support.c [PARALLEL_MARK && CAN_HANDLE_FORK]
(start_mark_threads): Set GC_markers_m1 value before starting
the first marker thread (it is already set if fork handling is off).
* win32_threads.c [GC_PTHREADS_PARAMARK && CAN_HANDLE_FORK]
(start_mark_threads): Likewise.
* pthread_support.c [PARALLEL_MARK] (start_mark_threads):
Adjust GC_markers_m1 value only if pthread_create failed.
* win32_threads.c [GC_PTHREADS_PARAMARK] (start_mark_threads):
Likewise.
mark.c
pthread_support.c
win32_threads.c