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 case of timeout, remember to re...
details: https://anonhg.NetBSD.org/src/rev/5aee97a053b5
branches: trunk
changeset: 748200:5aee97a053b5
user: pooka <pooka%NetBSD.org@localhost>
date: Fri Oct 16 02:13:54 2009 +0000
description:
In case of timeout, remember to remove ourselves from the sleep staleq.
diffstat:
sys/rump/librump/rumpkern/sleepq.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 89b855a641f7 -r 5aee97a053b5 sys/rump/librump/rumpkern/sleepq.c
--- a/sys/rump/librump/rumpkern/sleepq.c Fri Oct 16 00:45:26 2009 +0000
+++ b/sys/rump/librump/rumpkern/sleepq.c Fri Oct 16 02:13:54 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sleepq.c,v 1.3 2009/10/16 00:14:53 pooka Exp $ */
+/* $NetBSD: sleepq.c,v 1.4 2009/10/16 02:13:54 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.3 2009/10/16 00:14:53 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.4 2009/10/16 02:13:54 pooka Exp $");
#include <sys/param.h>
#include <sys/condvar.h>
@@ -74,8 +74,10 @@
int biglocks = l->l_biglocks;
while (l->l_wchan) {
- if ((error=cv_timedwait(&sq_cv, mp, timo)) == EWOULDBLOCK)
+ if ((error=cv_timedwait(&sq_cv, mp, timo)) == EWOULDBLOCK) {
+ TAILQ_REMOVE(l->l_sleepq, l, l_sleepchain);
l->l_wchan = NULL;
+ }
}
mutex_spin_exit(mp);
Home |
Main Index |
Thread Index |
Old Index