From fd582a89b6594e8f4053668fca96d481ef9b17d8 Mon Sep 17 00:00:00 2001 From: mglocker Date: Thu, 15 Jul 2010 04:46:33 +0000 Subject: [PATCH] * Comment poll support in conf.h * Comment why we call the video interrupt in the mmap interface now in uvideo.c --- sys/dev/usb/uvideo.c | 7 ++++++- sys/sys/conf.h | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c index ba5bd60acbd..7a4f78aa637 100644 --- a/sys/dev/usb/uvideo.c +++ b/sys/dev/usb/uvideo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvideo.c,v 1.132 2010/07/14 21:24:33 jakemsr Exp $ */ +/* $OpenBSD: uvideo.c,v 1.133 2010/07/15 04:46:33 mglocker Exp $ */ /* * Copyright (c) 2008 Robert Nagy @@ -2094,6 +2094,11 @@ uvideo_mmap_queue(struct uvideo_softc *sc, uint8_t *buf, int len) sc->sc_mmap_cur = 0; wakeup(sc); + + /* + * In case userland uses poll(2), signal that we have a frame + * ready to dequeue. + */ sc->sc_uplayer_intr(sc->sc_uplayer_arg); } diff --git a/sys/sys/conf.h b/sys/sys/conf.h index 67e387f7463..8fc628eb796 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.h,v 1.100 2010/07/14 21:24:33 jakemsr Exp $ */ +/* $OpenBSD: conf.h,v 1.101 2010/07/15 04:46:33 mglocker Exp $ */ /* $NetBSD: conf.h,v 1.33 1996/05/03 20:03:32 christos Exp $ */ /*- @@ -437,7 +437,7 @@ void randomattach(void); (dev_type_stop((*))) enodev, 0, selfalse, \ (dev_type_mmap((*))) enodev } -/* open, close, ioctl, read, mmap */ +/* open, close, ioctl, read, mmap, poll */ #define cdev_video_init(c,n) { \ dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \ (dev_type_write((*))) enodev, dev_init(c,n,ioctl), \ -- 2.20.1