Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Implement timeouts when blocking the calling pro...
details: https://anonhg.NetBSD.org/src/rev/1b7a8a24a3d3
branches: trunk
changeset: 771442:1b7a8a24a3d3
user: gavan <gavan%NetBSD.org@localhost>
date: Sun Nov 20 22:27:39 2011 +0000
description:
Implement timeouts when blocking the calling process with tsleep.
Fixes PR kern/33452
diffstat:
sys/dev/usb/ugen.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (54 lines):
diff -r 7be89265142a -r 1b7a8a24a3d3 sys/dev/usb/ugen.c
--- a/sys/dev/usb/ugen.c Sun Nov 20 21:50:38 2011 +0000
+++ b/sys/dev/usb/ugen.c Sun Nov 20 22:27:39 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ugen.c,v 1.111 2010/11/03 22:34:23 dyoung Exp $ */
+/* $NetBSD: ugen.c,v 1.112 2011/11/20 22:27:39 gavan Exp $ */
/*
* Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.111 2010/11/03 22:34:23 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.112 2011/11/20 22:27:39 gavan Exp $");
#include "opt_compat_netbsd.h"
@@ -619,7 +619,7 @@
}
sce->state |= UGEN_ASLP;
DPRINTFN(5, ("ugenread: sleep on %p\n", sce));
- error = tsleep(sce, PZERO | PCATCH, "ugenri", 0);
+ error = tsleep(sce, PZERO | PCATCH, "ugenri", mstohz(sce->timeout));
DPRINTFN(5, ("ugenread: woke, error=%d\n", error));
if (sc->sc_dying)
error = EIO;
@@ -664,7 +664,7 @@
("ugenread: sleep on %p\n",
sce));
error = tsleep(sce, PZERO | PCATCH,
- "ugenrb", 0);
+ "ugenrb", mstohz(sce->timeout));
DPRINTFN(5,
("ugenread: woke, error=%d\n",
error));
@@ -755,7 +755,7 @@
}
sce->state |= UGEN_ASLP;
DPRINTFN(5, ("ugenread: sleep on %p\n", sce));
- error = tsleep(sce, PZERO | PCATCH, "ugenri", 0);
+ error = tsleep(sce, PZERO | PCATCH, "ugenri", mstohz(sce->timeout));
DPRINTFN(5, ("ugenread: woke, error=%d\n", error));
if (sc->sc_dying)
error = EIO;
@@ -862,7 +862,7 @@
("ugenwrite: sleep on %p\n",
sce));
error = tsleep(sce, PZERO | PCATCH,
- "ugenwb", 0);
+ "ugenwb", mstohz(sce->timeout));
DPRINTFN(5,
("ugenwrite: woke, error=%d\n",
error));
Home |
Main Index |
Thread Index |
Old Index