]> granicus.if.org Git - gc/commit
Fix race (and potential deadlock) at marker threads initialization
authorIvan Maidanski <ivmai@mail.ru>
Tue, 22 Sep 2015 05:42:40 +0000 (08:42 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 22 Sep 2015 05:42:40 +0000 (08:42 +0300)
commit0ca6d3f4d4b7cc9b22eba174d343f7eae43834d2
treecf9309455b918c42e483ece86d09a5e25332f046
parent623679f5b3360a6fafc4fed45ccbc873eaa64e9e
Fix race (and potential deadlock) at marker threads initialization

* include/private/gc_priv.h (GC_wait_for_markers_init): New prototype.
* mark.c (GC_wait_for_markers_init): New function (if PARALLEL_MARK).
* pthread_support.c (GC_mark_thread): Notify start_mark_threads()
about completion of marker data initialization.
* win32_threads.c (GC_mark_thread): Likewise.
* pthread_support.c (start_mark_threads): Add assertion about
GC_fl_builder_count; call GC_wait_for_markers_init.
* win32_threads.c (start_mark_threads): Likewise.
* win32_threads.c (GC_mark_thread): Reformat code.
include/private/gc_priv.h
mark.c
pthread_support.c
win32_threads.c