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>
Tue, 26 Sep 2017 08:01:29 +0000 (11:01 +0300)
commit2f6ad63a58d638920c60b5d7fe7d4a6a63066398
tree8677e5470c053f651a279df56f52adc60d024aeb
parentb785014a6f8d6d6afb3521fd235e125c43e6028b
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