]> 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>
Fri, 23 Jun 2017 11:24:31 +0000 (14:24 +0300)
commit360407b2586eb6a612cff3863f0286b133bdc197
treefbc4dd389cbf88159ca5c0ee8d88f0da868cef7f
parent3b16a75d1db40a052123b0cdce7d4bb17a5e32d6
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