summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/thread/thr_sig.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libpthread/thread/thr_sig.c')
-rw-r--r--lib/libpthread/thread/thr_sig.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/libpthread/thread/thr_sig.c b/lib/libpthread/thread/thr_sig.c
index de177d9..5ac4998 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. */
OpenPOWER on IntegriCloud