summaryrefslogtreecommitdiff
path: root/win32_threads.c
diff options
context:
space:
mode:
authorivmai <ivmai>2010-04-16 10:45:41 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:53 +0200
commit0452589b7088d685f746fadbf198a895c41ebc30 (patch)
treedde08a71eaf15ac65a5197f290816b6c439420da /win32_threads.c
parent79d36f80ed7e7df5deaef7c3c1c853b392749fdb (diff)
2010-04-16 Ivan Maidanski <ivmai@mail.ru> (mostly really NIIBE Yutaka)
* pthread_support.c (GC_mark_thread_local_free_lists, GC_check_tls): Mark (and check) only for live threads (in case of GC_destroy_thread_local() is called already but GC_delete_thread() is not yet). * win32_threads.c (GC_mark_thread_local_free_lists, GC_check_tls): Ditto (matters only if GC_PTHREADS defined).
Diffstat (limited to 'win32_threads.c')
-rw-r--r--win32_threads.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/win32_threads.c b/win32_threads.c
index 3863582..7ad84db 100644
--- a/win32_threads.c
+++ b/win32_threads.c
@@ -2681,10 +2681,12 @@ GC_INNER void GC_init_parallel(void)
for (i = 0; i < THREAD_TABLE_SZ; ++i) {
for (p = GC_threads[i]; 0 != p; p = p -> tm.next) {
-# ifdef DEBUG_THREADS
- GC_printf("Marking thread locals for 0x%x\n", (int)p -> id);
-# endif
- GC_mark_thread_local_fls_for(&(p->tlfs));
+ if (!KNOWN_FINISHED(p)) {
+# ifdef DEBUG_THREADS
+ GC_printf("Marking thread locals for 0x%x\n", (int)p -> id);
+# endif
+ GC_mark_thread_local_fls_for(&(p->tlfs));
+ }
}
}
}
@@ -2703,7 +2705,8 @@ GC_INNER void GC_init_parallel(void)
for (i = 0; i < THREAD_TABLE_SZ; ++i) {
for (p = GC_threads[i]; 0 != p; p = p -> tm.next) {
- GC_check_tls_for(&(p->tlfs));
+ if (!KNOWN_FINISHED(p))
+ GC_check_tls_for(&(p->tlfs));
}
}
# if defined(USE_CUSTOM_SPECIFIC)