]> granicus.if.org Git - gc/commit
Fix GC_remove_specific invocation from remove_all_threads_but_me
authorIvan Maidanski <ivmai@mail.ru>
Mon, 28 Aug 2017 06:27:07 +0000 (09:27 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 28 Sep 2017 08:43:52 +0000 (11:43 +0300)
commit3d85c61f88c52d901234621c952ac4053a696d7d
treee6f450997066aadf603b738dbf1f67c1087e09bb
parent9b7ef4d25842dc6a79eaa76200511cce5a3610f5
Fix GC_remove_specific invocation from remove_all_threads_but_me
(fix commits fcfae7f38e65ea)

* include/private/specific.h (GC_remove_specific): Define as macro
(calls GC_remove_specific_after_fork).
* include/private/specific.h (GC_remove_specific_after_fork): New
GC_INNER function declaration.
* include/private/thread_local_alloc.h [USE_PTHREAD_SPECIFIC
|| USE_COMPILER_TLS || USE_WIN32_COMPILER_TLS || USE_WIN32_SPECIFIC]
(GC_remove_specific_after_fork): New macro (defined to no-op).
* pthread_support.c [CAN_HANDLE_FORK && THREAD_LOCAL_ALLOC]
(GC_remove_all_threads_but_me): Call GC_remove_specific_after_fork
instead of GC_remove_specific (i.e. delete thread-specific control data
for the given thread instead of the current one).
* win32_threads.c [CAN_HANDLE_FORK && THREAD_LOCAL_ALLOC] Like
* specific.c [USE_CUSTOM_SPECIFIC] (GC_setspecific): Add assertion that
the allocation lock is held; remove the corresponding comment.
* specific.c [USE_CUSTOM_SPECIFIC] (GC_remove_specific): Replace to
GC_remove_specific_after_fork (add t argument); replace self local
variable with t argument; update comment;
* specific.c [USE_CUSTOM_SPECIFIC && CAN_HANDLE_FORK]
(GC_remove_specific_after_fork): Add assertion that the allocation lock
is held; add comment.
include/private/specific.h
include/private/thread_local_alloc.h
pthread_support.c
specific.c
win32_threads.c