summaryrefslogtreecommitdiff
path: root/thread_local_alloc.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2011-12-29 14:04:58 +0400
committerIvan Maidanski <ivmai@mail.ru>2011-12-29 14:04:58 +0400
commit089667c19cde23eb5988778411ff28e186465d16 (patch)
tree08c25acafd9be886298ceb58d71e340ba193c59a /thread_local_alloc.c
parentad1ccb54434cb673d8a825dccf8b1cff364fd2ed (diff)
downloadbdwgc-089667c19cde23eb5988778411ff28e186465d16.tar.gz
Use EXPECT for checking various 'initialized' boolean variables
* alloc.c (GC_try_to_collect_general, GC_expand_hp): Use "expect true" for GC_is_initialized value. * gcj_mlc.c (maybe_finalize): Likewise. * malloc.c (GC_alloc_large, GC_generic_malloc_inner, malloc): Likewise. * mallocx.c (GC_generic_malloc_many): Likewise. * mark_rts.c (GC_add_roots, GC_clear_roots): Likewise. * misc.c (GC_base, GC_init): Likewise. * ptr_chck.c (GC_same_obj, GC_is_valid_displacement, GC_is_visible): Likewise. * darwin_stop_world.c (GC_push_all_stacks): Use "expect true" for GC_thr_initialized value. * pthread_stop_world.c (GC_push_all_stacks): Likewise. * pthread_support.c (pthread_create): Likewise. * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Use "expect true" for excluded_segs value. * include/private/gc_priv.h (COND_DUMP): Use "expect false" for GC_dump_regularly value. * malloc.c (GC_generic_malloc): Use "expect false" for GC_have_errors value. * mallocx.c (GC_generic_malloc_ignore_off_page, GC_generic_malloc_many): Likewise. * malloc.c (calloc): Use "expect true" for lib_bounds_set value. * os_dep.c (GC_unix_mmap_get_mem): Use "expect true" for "initialized" value. * pthread_stop_world.c (GC_nacl_initialize_gc_thread): Use "expect true" for GC_nacl_thread_parking_inited value. * pthread_support.c (INIT_REAL_SYMS): Use "expect true" for GC_syms_initialized value; remove redundant trailing ';'. * pthread_support.c (GC_new_thread): Use "expect true" for first_thread_used value. * win32_threads.c (GC_new_thread): Likewise. * pthread_support.c (pthread_create): Use "expect true" for parallel_initialized value. * win32_threads.c (GC_CreateThread, GC_beginthreadex, GC_pthread_join, GC_pthread_create, GC_pthread_sigmask, GC_pthread_detach): Likewise. * pthread_support.c (pthread_create): Use "expect false" for "si" value to be NULL. * thread_local_alloc.c (GC_init_thread_local): Use "expect true" for keys_initialized value. * typd_mlc.c (GC_make_descriptor): Use "expect true" for GC_explicit_typing_initialized value.
Diffstat (limited to 'thread_local_alloc.c')
-rw-r--r--thread_local_alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thread_local_alloc.c b/thread_local_alloc.c
index 83211675..82523cd6 100644
--- a/thread_local_alloc.c
+++ b/thread_local_alloc.c
@@ -89,7 +89,7 @@ GC_INNER void GC_init_thread_local(GC_tlfs p)
int i;
GC_ASSERT(I_HOLD_LOCK());
- if (!keys_initialized) {
+ if (!EXPECT(keys_initialized, TRUE)) {
if (0 != GC_key_create(&GC_thread_key, 0)) {
ABORT("Failed to create key for local allocator");
}