]> granicus.if.org Git - gc/commit
Make GC_INIT optional for clients even if thread-local allocations enabled
authorIvan Maidanski <ivmai@mail.ru>
Fri, 23 Jun 2017 11:06:11 +0000 (14:06 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Sun, 2 Jul 2017 09:24:57 +0000 (12:24 +0300)
commit128cf0b0cbfb12dae4c627d855b2a958a240da94
treeeb79a17c67d1f89e352ed5174cd903eb7af3268f
parent9102097451e5cc29ad8ee4974dfc92b3fbcfe2c1
Make GC_INIT optional for clients even if thread-local allocations enabled

* tests/test.c (GC_OPT_INIT): Do not define to GC_INIT() even if
THREAD_LOCAL_ALLOC; force define to GC_INIT() if TEST_EXPLICIT_GC_INIT
macro defined.
* thread_local_alloc.c [USE_PTHREAD_SPECIFIC || USE_WIN32_SPECIFIC]
(GC_malloc_kind): Check keys_initialized before GC_getspecific call
(fall back to GC_malloc_kind_global if keys_initialized is false).
tests/test.c
thread_local_alloc.c