for (p = GC_threads[hv]; 0 != p; p = next) {
next = p -> next;
if (THREAD_EQUAL(p -> id, self)) {
+ int res;
+
me = p;
p -> next = 0;
# ifdef GC_DARWIN_THREADS
/* we re-assign thread-local pointer to 'tlfs' for safety */
/* instead of the assertion check (again, it is OK to call */
/* GC_destroy_thread_local and GC_free_internal before). */
- if (GC_setspecific(GC_thread_key, &me->tlfs) != 0)
+ res = GC_setspecific(GC_thread_key, &me->tlfs);
+ if (COVERT_DATAFLOW(res) != 0)
ABORT("GC_setspecific failed (in child)");
# endif
} else {
/* This call must be made from the new thread. */
GC_INNER void GC_init_thread_local(GC_tlfs p)
{
- int i, j;
+ int i, j, res;
GC_ASSERT(I_HOLD_LOCK());
if (!EXPECT(keys_initialized, TRUE)) {
GC_ASSERT((word)&GC_thread_key % sizeof(word) == 0);
- if (0 != GC_key_create(&GC_thread_key, reset_thread_key)) {
+ res = GC_key_create(&GC_thread_key, reset_thread_key);
+ if (COVERT_DATAFLOW(res) != 0) {
ABORT("Failed to create key for local allocator");
}
keys_initialized = TRUE;
}
- if (0 != GC_setspecific(GC_thread_key, p)) {
+ res = GC_setspecific(GC_thread_key, p);
+ if (COVERT_DATAFLOW(res) != 0) {
ABORT("Failed to set thread specific allocation pointers");
}
for (j = 0; j < TINY_FREELISTS; ++j) {