diff options
Diffstat (limited to 'lib/libpthread/thread/thr_find_thread.c')
-rw-r--r-- | lib/libpthread/thread/thr_find_thread.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libpthread/thread/thr_find_thread.c b/lib/libpthread/thread/thr_find_thread.c index b5cae66..0c813db 100644 --- a/lib/libpthread/thread/thr_find_thread.c +++ b/lib/libpthread/thread/thr_find_thread.c @@ -85,6 +85,9 @@ _thr_ref_delete(struct pthread *curthread, struct pthread *thread) KSE_LOCK_ACQUIRE(curthread->kse, &_thread_list_lock); thread->refcount--; curthread->critical_count--; + if ((thread->refcount == 0) && + (thread->flags & THR_FLAGS_GC_SAFE) != 0) + THR_GCLIST_ADD(thread); KSE_LOCK_RELEASE(curthread->kse, &_thread_list_lock); _kse_critical_leave(crit); } |