# define GC_MACH_THREAD_STATE_FLAVOR PPC_THREAD_STATE
# elif defined(I386)
# define GC_MACH_THREAD_STATE_FLAVOR i386_THREAD_STATE
+# elif defined(X86_64)
+# define GC_MACH_THREAD_STATE_FLAVOR x86_THREAD_STATE64
# else
# define GC_MACH_THREAD_STATE_FLAVOR MACHINE_THREAD_STATE
# endif
/* Caller holds allocation lock. */
GC_thread GC_new_thread(pthread_t id)
{
- int hv = ((word)id) % THREAD_TABLE_SZ;
+ int hv = ((unsigned long)id) % THREAD_TABLE_SZ;
GC_thread result;
static GC_bool first_thread_used = FALSE;
/* Caller holds allocation lock. */
void GC_delete_thread(pthread_t id)
{
- int hv = ((word)id) % THREAD_TABLE_SZ;
+ int hv = ((unsigned long)id) % THREAD_TABLE_SZ;
register GC_thread p = GC_threads[hv];
register GC_thread prev = 0;
/* This is OK, but we need a way to delete a specific one. */
void GC_delete_gc_thread(pthread_t id, GC_thread gc_id)
{
- int hv = ((word)id) % THREAD_TABLE_SZ;
+ int hv = ((unsigned long)id) % THREAD_TABLE_SZ;
register GC_thread p = GC_threads[hv];
register GC_thread prev = 0;
/* return the most recent one. */
GC_thread GC_lookup_thread(pthread_t id)
{
- int hv = ((word)id) % THREAD_TABLE_SZ;
+ int hv = ((unsigned long)id) % THREAD_TABLE_SZ;
register GC_thread p = GC_threads[hv];
while (p != 0 && !pthread_equal(p -> id, id)) p = p -> next;