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 set return value properly
details: https://anonhg.NetBSD.org/src/rev/f1b03bf8b328
branches: trunk
changeset: 748954:f1b03bf8b328
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Nov 11 16:50:17 2009 +0000
description:
set return value properly
diffstat:
sys/rump/librump/rumpkern/ltsleep.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (32 lines):
diff -r 40ef0c265069 -r f1b03bf8b328 sys/rump/librump/rumpkern/ltsleep.c
--- a/sys/rump/librump/rumpkern/ltsleep.c Wed Nov 11 16:47:50 2009 +0000
+++ b/sys/rump/librump/rumpkern/ltsleep.c Wed Nov 11 16:50:17 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ltsleep.c,v 1.20 2009/11/11 16:47:50 pooka Exp $ */
+/* $NetBSD: ltsleep.c,v 1.21 2009/11/11 16:50:17 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ltsleep.c,v 1.20 2009/11/11 16:47:50 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ltsleep.c,v 1.21 2009/11/11 16:50:17 pooka Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -61,8 +61,11 @@
/* protected by biglock */
if (timo) {
- rv = rumpuser_cv_timedwait(ltsp->cv, rump_giantlock,
- timo / hz, (timo % hz) * (1000000000/hz));
+ if (rumpuser_cv_timedwait(ltsp->cv, rump_giantlock,
+ timo / hz, (timo % hz) * (1000000000/hz)) == 0)
+ rv = 0;
+ else
+ rv = EWOULDBLOCK;
} else {
rumpuser_cv_wait(ltsp->cv, rump_giantlock);
rv = 0;
Home |
Main Index |
Thread Index |
Old Index