]> 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>
Thu, 28 Sep 2017 08:20:02 +0000 (11:20 +0300)
commit46d2a44df2a43829b0f7595d2b9f364980e6eae2
treee385e78940331832f31a5be4e9ca6f375f0e0c14
parent33a00c2906eba0205c1056383c935cf1174005cc
Avoid busy waiting in mark_thread while GC_parallel is false

* 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]
(GC_start_mark_threads_inner): 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]
(GC_start_mark_threads_inner): Likewise.
* pthread_support.c [PARALLEL_MARK] (GC_start_mark_threads_inner):
Adjust GC_markers_m1 value only if pthread_create failed.
* win32_threads.c [GC_PTHREADS_PARAMARK] (GC_start_mark_threads_inner):
Likewise.
mark.c
pthread_support.c
win32_threads.c