From 82344a3c910992bcd38bea88e132fde71ab7cd80 Mon Sep 17 00:00:00 2001 From: ivmai Date: Fri, 18 Dec 2009 13:15:52 +0000 Subject: [PATCH] 2009-12-18 Ivan Maidanski * win32_threads.c (GC_register_my_thread_inner, GC_pthread_start_inner): Undo the previous commit changes for the thread flags and DETACHED state (since the state is only tested in GC_thread_exit_proc). --- ChangeLog | 7 +++++++ win32_threads.c | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8d4546394..2748a3ed8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-12-18 Ivan Maidanski + + * win32_threads.c (GC_register_my_thread_inner, + GC_pthread_start_inner): Undo the previous commit changes for + the thread flags and DETACHED state (since the state is only + tested in GC_thread_exit_proc). + 2009-12-18 Ivan Maidanski (with input from Jean-Claude Beaudoin) diff --git a/win32_threads.c b/win32_threads.c index 3b0e81836..1c13e69ff 100644 --- a/win32_threads.c +++ b/win32_threads.c @@ -442,7 +442,6 @@ STATIC GC_thread GC_register_my_thread_inner(const struct GC_stack_base *sb, # ifdef GC_PTHREADS /* me can be NULL -> segfault */ me -> pthread_id = pthread_self(); - me -> flags = DETACHED; /* cleared in GC_pthread_start_inner if needed */ # endif # ifndef MSWINCE /* GetCurrentThread() returns a pseudohandle (a const value). */ @@ -2437,7 +2436,7 @@ GC_INNER void GC_thr_init(void) me = GC_register_my_thread_inner(sb, thread_id); SET_PTHREAD_MAP_CACHE(pthread_id, thread_id); me -> pthread_id = pthread_id; - if (!si->detached) me -> flags &= ~DETACHED; + if (si->detached) me -> flags |= DETACHED; UNLOCK(); start = si -> start_routine;