summaryrefslogtreecommitdiff
path: root/win32_threads.c
diff options
context:
space:
mode:
authorivmai <ivmai>2009-12-18 14:15:52 +0100
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:52 +0200
commit82344a3c910992bcd38bea88e132fde71ab7cd80 (patch)
tree757d175528dea02f36d5f946a8c6f881a1abb56b /win32_threads.c
parentb795ce4a19e8edb6981b03ec76ad7d3e3d4e6db4 (diff)
2009-12-18 Ivan Maidanski <ivmai@mail.ru>
* 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).
Diffstat (limited to 'win32_threads.c')
-rw-r--r--win32_threads.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/win32_threads.c b/win32_threads.c
index 3b0e818..1c13e69 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;