]> granicus.if.org Git - gc/commit
Fix removal of dead threads in a child process
authorIvan Maidanski <ivmai@mail.ru>
Tue, 26 Sep 2017 08:01:29 +0000 (11:01 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 28 Sep 2017 08:54:43 +0000 (11:54 +0300)
commit43d165d10efb056c80ea26d9edab69cdcdeb8fd7
tree96baa77598d2d1ba221f8c9d4078c7cb081013fc
parent29269f18cda4576866de7a08912d8c7966e48cb9
Fix removal of dead threads in a child process

GC_threads table may contain several elements with the same pthread id,
so GC_remove_all_threads_but_me should remove all elements except for
the first found element matching the id of the current thread.

* pthread_support.c [CAN_HANDLE_FORK] (GC_remove_all_threads_but_me):
Do not assign me if it is already non-null; add comment.
* win32_threads.c [CAN_HANDLE_FORK] (GC_remove_all_threads_but_me):
Likewise.
* win32_threads.c [CAN_HANDLE_FORK] (GC_remove_all_threads_but_me):
Remove GC_ASSERT(me==NULL).
pthread_support.c
win32_threads.c