diff options
| author | Xin LI <delphij@FreeBSD.org> | 2006-07-17 09:23:44 +0000 |
|---|---|---|
| committer | Xin LI <delphij@FreeBSD.org> | 2006-07-17 09:23:44 +0000 |
| commit | da845843909e102737ba476f15db35b307475f1c (patch) | |
| tree | ee07dd39ba798682ef9bfd4811e2c904be7109b2 /lib/libthr/thread/thr_list.c | |
| parent | 9c499ad92f03f9ffbbe9d2e437f3186371ca9416 (diff) | |
Notes
Diffstat (limited to 'lib/libthr/thread/thr_list.c')
| -rw-r--r-- | lib/libthr/thread/thr_list.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libthr/thread/thr_list.c b/lib/libthr/thread/thr_list.c index d46b5ea88fd8..56f5972467c3 100644 --- a/lib/libthr/thread/thr_list.c +++ b/lib/libthr/thread/thr_list.c @@ -101,8 +101,7 @@ _thr_gc(struct pthread *curthread) THREAD_LIST_LOCK(curthread); /* Check the threads waiting for GC. */ - for (td = TAILQ_FIRST(&_thread_gc_list); td != NULL; td = td_next) { - td_next = TAILQ_NEXT(td, gcle); + TAILQ_FOREACH_SAFE(td, &_thread_gc_list, gcle, td_next) { if (td->tid != TID_TERMINATED) { /* make sure we are not still in userland */ continue; |
