Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Commit

Permalink
Properly figure out if the thread has died already
Browse files Browse the repository at this point in the history
  • Loading branch information
roblabla committed Jan 4, 2018
1 parent fd75d19 commit 139e943
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pthread/rthread_thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ _rthread_reaper(void)
restart:
_spinlock(&_thread_gc_lock);
TAILQ_FOREACH(thread, &_thread_gc_list, waiting) {
if (thread->tib_tid != 0)
if (!(thread->flags & THREAD_DONE))
continue;
TAILQ_REMOVE(&_thread_gc_list, thread, waiting);
_spinunlock(&_thread_gc_lock);
Expand Down

0 comments on commit 139e943

Please sign in to comment.