}
# ifdef DEBUG_THREADS
GC_log_printf("Darwin: Stack for thread %p = [%p,%p)\n",
- (void *)thread, lo, *phi);
+ (void *)(word)thread, lo, *phi);
# endif
return lo;
}
# endif
# ifdef DEBUG_THREADS
- GC_log_printf("Attempting to suspend thread %p\n", (void *)thread);
+ GC_log_printf("Attempting to suspend thread %p\n",
+ (void *)(word)thread);
# endif
/* find the current thread in the old list */
found = FALSE;
continue;
}
# ifdef DEBUG_THREADS
- GC_log_printf("Thread state for %p = %d\n", (void *)thread, info.run_state);
+ GC_log_printf("Thread state for %p = %d\n", (void *)(word)thread,
+ info.run_state);
# endif
if (info.suspend_count != 0) {
/* thread is already suspended. */
}
# ifdef DEBUG_THREADS
- GC_log_printf("Suspending %p\n", (void *)thread);
+ GC_log_printf("Suspending %p\n", (void *)(word)thread);
# endif
kern_result = thread_suspend(thread);
if (kern_result != KERN_SUCCESS) {
if (!found)
GC_mach_threads_count++;
if (GC_on_thread_event)
- GC_on_thread_event(GC_EVENT_THREAD_SUSPENDED, (void *)thread);
+ GC_on_thread_event(GC_EVENT_THREAD_SUSPENDED, (void *)(word)thread);
}
return changed;
}
kern_return_t kern_result;
# ifdef DEBUG_THREADS
- GC_log_printf("Stopping the world from thread %p\n", (void *)my_thread);
+ GC_log_printf("Stopping the world from thread %p\n",
+ (void *)(word)my_thread);
# endif
# ifdef PARALLEL_MARK
if (GC_parallel) {
ABORT("thread_suspend failed");
if (GC_on_thread_event)
GC_on_thread_event(GC_EVENT_THREAD_SUSPENDED,
- (void *)p->stop_info.mach_thread);
+ (void *)(word)p->stop_info.mach_thread);
}
}
}
# endif
# ifdef DEBUG_THREADS
- GC_log_printf("World stopped from %p\n", (void *)my_thread);
+ GC_log_printf("World stopped from %p\n", (void *)(word)my_thread);
# endif
mach_port_deallocate(my_task, my_thread);
}
ABORT("thread_info failed");
# endif
# ifdef DEBUG_THREADS
- GC_log_printf("Resuming thread %p with state %d\n", (void *)thread,
+ GC_log_printf("Resuming thread %p with state %d\n", (void *)(word)thread,
info.run_state);
# endif
/* Resume the thread */
if (kern_result != KERN_SUCCESS)
ABORT("thread_resume failed");
if (GC_on_thread_event)
- GC_on_thread_event(GC_EVENT_THREAD_UNSUSPENDED, (void *)thread);
+ GC_on_thread_event(GC_EVENT_THREAD_UNSUSPENDED, (void *)(word)thread);
}
/* Caller holds allocation lock, and has held it continuously since */
if (GC_mach_threads[j].already_suspended) {
# ifdef DEBUG_THREADS
GC_log_printf("Not resuming already suspended thread %p\n",
- (void *)thread);
+ (void *)(word)thread);
# endif
} else {
GC_thread_resume(thread);