pthread_t self = pthread_self();
word total_size = 0;
- if (!GC_thr_initialized) GC_thr_init();
+ if (!EXPECT(GC_thr_initialized, TRUE))
+ GC_thr_init();
# ifdef DEBUG_THREADS
- GC_log_printf("Pushing stacks from thread 0x%x\n", (unsigned)self);
+ GC_log_printf("Pushing stacks from thread %p\n", (void *)self);
# endif
for (i = 0; i < THREAD_TABLE_SZ; i++) {
for (p = GC_threads[i]; p != 0; p = p -> next) {
int hv = NUMERIC_THREAD_ID(id) % THREAD_TABLE_SZ;
GC_thread result;
static GC_bool first_thread_used = FALSE;
+ # ifdef DEBUG_THREADS
+ GC_log_printf("Creating thread %p\n", (void *)id);
+ # endif
GC_ASSERT(I_HOLD_LOCK());
- if (!first_thread_used) {
+ if (!EXPECT(first_thread_used, TRUE)) {
result = &first_thread;
first_thread_used = TRUE;
} else {