Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpkern in sleepq_wake(), honor the "expec...
details: https://anonhg.NetBSD.org/src/rev/fe47be921270
branches: trunk
changeset: 328912:fe47be921270
user: pooka <pooka%NetBSD.org@localhost>
date: Thu Apr 24 11:56:11 2014 +0000
description:
in sleepq_wake(), honor the "expected" parameter
diffstat:
sys/rump/librump/rumpkern/sleepq.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diffs (37 lines):
diff -r 899865a54f91 -r fe47be921270 sys/rump/librump/rumpkern/sleepq.c
--- a/sys/rump/librump/rumpkern/sleepq.c Thu Apr 24 03:00:10 2014 +0000
+++ b/sys/rump/librump/rumpkern/sleepq.c Thu Apr 24 11:56:11 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sleepq.c,v 1.14 2013/03/10 11:21:05 pooka Exp $ */
+/* $NetBSD: sleepq.c,v 1.15 2014/04/24 11:56:11 pooka Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.14 2013/03/10 11:21:05 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.15 2014/04/24 11:56:11 pooka Exp $");
#include <sys/param.h>
#include <sys/condvar.h>
@@ -105,9 +105,6 @@
struct lwp *l, *l_next;
bool found = false;
- if (__predict_false(expected != -1))
- panic("sleepq_wake: \"expected\" not supported");
-
for (l = TAILQ_FIRST(sq); l; l = l_next) {
l_next = TAILQ_NEXT(l, l_sleepchain);
if (l->l_wchan == wchan) {
@@ -115,6 +112,8 @@
l->l_wchan = NULL;
l->l_wmesg = NULL;
TAILQ_REMOVE(sq, l, l_sleepchain);
+ if (--expected == 0)
+ break;
}
}
if (found)
Home |
Main Index |
Thread Index |
Old Index