summaryrefslogtreecommitdiff
path: root/sys/dev/usb/uvideo.c
diff options
context:
space:
mode:
authorMarcus Glocker <mglocker@cvs.openbsd.org>2008-06-22 20:58:18 +0000
committerMarcus Glocker <mglocker@cvs.openbsd.org>2008-06-22 20:58:18 +0000
commit59be0deb6c8aa359e4c31003703d97b85e6e3e94 (patch)
treea40e23d6ba04ff31a33909e09cc6598f39c21120 /sys/dev/usb/uvideo.c
parent3300e58cf25813f95d5f10ed3b8b2ab76389841c (diff)
If no frame gets queue for a certain time, return EINVAL to the userland
application which will cause it to exit instead let it stuck forever.
Diffstat (limited to 'sys/dev/usb/uvideo.c')
-rw-r--r--sys/dev/usb/uvideo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c
index 8082ab423c9..54aaf3c01e4 100644
--- a/sys/dev/usb/uvideo.c
+++ b/sys/dev/usb/uvideo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvideo.c,v 1.39 2008/06/15 17:07:18 mglocker Exp $ */
+/* $OpenBSD: uvideo.c,v 1.40 2008/06/22 20:58:17 mglocker Exp $ */
/*
* Copyright (c) 2008 Robert Nagy <robert@openbsd.org>
@@ -1919,7 +1919,7 @@ uvideo_dqbuf(void *v, struct v4l2_buffer *dqb)
if (SIMPLEQ_EMPTY(&sc->sc_mmap_q)) {
/* mmap queue is empty, block until first frame is queued */
- error = tsleep(sc, 0, "vid_mmap", 0);
+ error = tsleep(sc, 0, "vid_mmap", 10 * hz);
if (error)
return (EINVAL);
}