+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).
+
2010-04-09 Ivan Maidanski <ivmai@mail.ru>
* NT_MAKEFILE: Remove the comment about DLL and Win32S.
for (i = 0; i < THREAD_TABLE_SZ; ++i) {
for (p = GC_threads[i]; 0 != p; p = p -> next) {
- GC_mark_thread_local_fls_for(&(p->tlfs));
+ if (!(p -> flags & FINISHED))
+ GC_mark_thread_local_fls_for(&(p->tlfs));
}
}
}
void GC_check_tsd_marks(tsd *key);
# endif
/* Check that all thread-local free-lists are completely marked. */
- /* also check that thread-specific-data structures are marked. */
+ /* Also check that thread-specific-data structures are marked. */
void GC_check_tls(void)
{
int i;
for (i = 0; i < THREAD_TABLE_SZ; ++i) {
for (p = GC_threads[i]; 0 != p; p = p -> next) {
- GC_check_tls_for(&(p->tlfs));
+ if (!(p -> flags & FINISHED))
+ GC_check_tls_for(&(p->tlfs));
}
}
# if defined(USE_CUSTOM_SPECIFIC)
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));
+ }
}
}
}
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)