diff options
| author | Daniel Eischen <deischen@FreeBSD.org> | 2003-04-28 21:35:06 +0000 |
|---|---|---|
| committer | Daniel Eischen <deischen@FreeBSD.org> | 2003-04-28 21:35:06 +0000 |
| commit | 76f344139cfc69d716badfa778cd28e57acbe136 (patch) | |
| tree | 2807b11e0e61a9d6cd6961bfb98d0119e4ebc25d /lib/libpthread/thread/thr_sig.c | |
| parent | 7d78074030850de9ad467dcacfd8a7ecb9f4d4ea (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_sig.c')
| -rw-r--r-- | lib/libpthread/thread/thr_sig.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/libpthread/thread/thr_sig.c b/lib/libpthread/thread/thr_sig.c index de177d9ce8e0..5ac4998a8e0f 100644 --- a/lib/libpthread/thread/thr_sig.c +++ b/lib/libpthread/thread/thr_sig.c @@ -258,7 +258,7 @@ struct pthread * thr_sig_find(struct kse *curkse, int sig, siginfo_t *info) { int handler_installed; - struct pthread *pthread, *pthread_next; + struct pthread *pthread; struct pthread *suspended_thread, *signaled_thread; DBG_MSG("Looking for thread to handle signal %d\n", sig); @@ -285,14 +285,7 @@ thr_sig_find(struct kse *curkse, int sig, siginfo_t *info) signaled_thread = NULL; KSE_LOCK_ACQUIRE(curkse, &_thread_list_lock); - for (pthread = TAILQ_FIRST(&_thread_list); - pthread != NULL; pthread = pthread_next) { - /* - * Grab the next thread before possibly destroying - * the link entry. - */ - pthread_next = TAILQ_NEXT(pthread, pqe); - + TAILQ_FOREACH(pthread, &_thread_list, tle) { if ((pthread->state == PS_SIGWAIT) && sigismember(pthread->data.sigwait, sig)) { /* Take the scheduling lock. */ |
