diff options
author | Mark Johnston <markj@FreeBSD.org> | 2016-12-22 17:51:44 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2016-12-22 17:51:44 +0000 |
commit | aa3c544349757f7b8e0020bcd088b90ec3f4608f (patch) | |
tree | 8b387ce4ea9e0011dba17239b66a15cecf71a378 /sys/kern/subr_sleepqueue.c | |
parent | 57a9273f9323ef4687d352dc187432974a0ffbe5 (diff) |
Notes
Diffstat (limited to 'sys/kern/subr_sleepqueue.c')
-rw-r--r-- | sys/kern/subr_sleepqueue.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/subr_sleepqueue.c b/sys/kern/subr_sleepqueue.c index 75afcc5f5d3c..6465c5ec12ef 100644 --- a/sys/kern/subr_sleepqueue.c +++ b/sys/kern/subr_sleepqueue.c @@ -880,7 +880,7 @@ int sleepq_broadcast(void *wchan, int flags, int pri, int queue) { struct sleepqueue *sq; - struct thread *td; + struct thread *td, *tdn; int wakeup_swapper; CTR2(KTR_PROC, "sleepq_broadcast(%p, %d)", wchan, flags); @@ -894,7 +894,7 @@ sleepq_broadcast(void *wchan, int flags, int pri, int queue) /* Resume all blocked threads on the sleep queue. */ wakeup_swapper = 0; - while ((td = TAILQ_FIRST(&sq->sq_blocked[queue])) != NULL) { + TAILQ_FOREACH_SAFE(td, &sq->sq_blocked[queue], td_slpq, tdn) { thread_lock(td); wakeup_swapper |= sleepq_resume_thread(sq, td, pri); thread_unlock(td); |