]> 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>
Tue, 22 Aug 2017 05:56:31 +0000 (08:56 +0300)
commitc4573a58fc1651e0f030a976fce341b530c2265d
tree8f6e6a411d561dafabeafba12060305bca289ec4
parent207ba534acd38fd1acd722e02a07cc33e09720c8
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