diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/cy/cy.c | 4 | ||||
-rw-r--r-- | sys/dev/cy/cy_isa.c | 4 | ||||
-rw-r--r-- | sys/dev/dgb/dgb.c | 4 | ||||
-rw-r--r-- | sys/dev/mse/mse.c | 38 | ||||
-rw-r--r-- | sys/dev/pci/pci.c | 4 | ||||
-rw-r--r-- | sys/dev/rc/rc.c | 2 | ||||
-rw-r--r-- | sys/dev/rp/rp.c | 2 | ||||
-rw-r--r-- | sys/dev/si/si.c | 4 | ||||
-rw-r--r-- | sys/dev/sio/sio.c | 4 | ||||
-rw-r--r-- | sys/dev/syscons/syscons.c | 4 |
10 files changed, 37 insertions, 33 deletions
diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c index 40f0bf3..b56fc42 100644 --- a/sys/dev/cy/cy.c +++ b/sys/dev/cy/cy.c @@ -27,7 +27,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: cy.c,v 1.52 1997/09/01 07:45:25 fsmp Exp $ + * $Id: cy.c,v 1.53 1997/09/03 01:50:24 bde Exp $ */ #include "cy.h" @@ -381,7 +381,7 @@ static d_devtotty_t siodevtotty; static struct cdevsw sio_cdevsw = { sioopen, sioclose, sioread, siowrite, sioioctl, siostop, noreset, siodevtotty, - ttselect, nommap, NULL, driver_name, + ttpoll, nommap, NULL, driver_name, NULL, -1, }; diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c index 40f0bf3..b56fc42 100644 --- a/sys/dev/cy/cy_isa.c +++ b/sys/dev/cy/cy_isa.c @@ -27,7 +27,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: cy.c,v 1.52 1997/09/01 07:45:25 fsmp Exp $ + * $Id: cy.c,v 1.53 1997/09/03 01:50:24 bde Exp $ */ #include "cy.h" @@ -381,7 +381,7 @@ static d_devtotty_t siodevtotty; static struct cdevsw sio_cdevsw = { sioopen, sioclose, sioread, siowrite, sioioctl, siostop, noreset, siodevtotty, - ttselect, nommap, NULL, driver_name, + ttpoll, nommap, NULL, driver_name, NULL, -1, }; diff --git a/sys/dev/dgb/dgb.c b/sys/dev/dgb/dgb.c index e0b1808..a146720 100644 --- a/sys/dev/dgb/dgb.c +++ b/sys/dev/dgb/dgb.c @@ -1,5 +1,5 @@ /*- - * dgb.c $Id: dgb.c,v 1.26 1997/06/14 15:19:48 bde Exp $ + * dgb.c $Id: dgb.c,v 1.27 1997/07/01 00:22:35 bde Exp $ * * Digiboard driver. * @@ -227,7 +227,7 @@ static d_devtotty_t dgbdevtotty; static struct cdevsw dgb_cdevsw = { dgbopen, dgbclose, dgbread, dgbwrite, /*58*/ dgbioctl, dgbstop, noreset, dgbdevtotty, /* dgb */ - ttselect, nommap, NULL, "dgb", NULL, -1 }; + ttpoll, nommap, NULL, "dgb", NULL, -1 }; static speed_t dgbdefaultrate = TTYDEF_SPEED; diff --git a/sys/dev/mse/mse.c b/sys/dev/mse/mse.c index 091ff8c..8be260c 100644 --- a/sys/dev/mse/mse.c +++ b/sys/dev/mse/mse.c @@ -11,7 +11,7 @@ * this software for any purpose. It is provided "as is" * without express or implied warranty. * - * $Id: mse.c,v 1.32 1997/03/24 11:23:56 bde Exp $ + * $Id: mse.c,v 1.33 1997/07/20 14:10:06 bde Exp $ */ /* * Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and @@ -51,6 +51,7 @@ #include <sys/conf.h> #include <sys/proc.h> #include <sys/kernel.h> +#include <sys/poll.h> #include <sys/uio.h> #ifdef DEVFS #include <sys/devfsext.h> @@ -70,13 +71,13 @@ struct isa_driver msedriver = { static d_open_t mseopen; static d_close_t mseclose; static d_read_t mseread; -static d_select_t mseselect; +static d_poll_t msepoll; #define CDEV_MAJOR 27 static struct cdevsw mse_cdevsw = { mseopen, mseclose, mseread, nowrite, /*27*/ noioc, nostop, nullreset, nodevtotty,/* mse */ - mseselect, nommap, NULL, "mse", NULL, -1 }; + msepoll, nommap, NULL, "mse", NULL, -1 }; /* @@ -365,31 +366,34 @@ mseread(dev, uio, ioflag) } /* - * mseselect: check for mouse input to be processed. + * msepoll: check for mouse input to be processed. */ static int -mseselect(dev, rw, p) +msepoll(dev, events, p) dev_t dev; - int rw; + int events; struct proc *p; { register struct mse_softc *sc = &mse_sc[MSE_UNIT(dev)]; int s; + int revents = 0; s = spltty(); - if (sc->sc_bytesread != PROTOBYTES || sc->sc_deltax != 0 || - sc->sc_deltay != 0 || (sc->sc_obuttons ^ sc->sc_buttons) != 0) { - splx(s); - return (1); - } + if (events & (POLLIN | POLLRDNORM)) + if (sc->sc_bytesread != PROTOBYTES || sc->sc_deltax != 0 || + sc->sc_deltay != 0 || + (sc->sc_obuttons ^ sc->sc_buttons) != 0) + revents |= events & (POLLIN | POLLRDNORM); + else { + /* + * Since this is an exclusive open device, any previous + * proc pointer is trash now, so we can just assign it. + */ + selrecord(p, &sc->sc_selp); + } - /* - * Since this is an exclusive open device, any previous proc. - * pointer is trash now, so we can just assign it. - */ - selrecord(p, &sc->sc_selp); splx(s); - return (0); + return (revents); } /* diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index bb5a0f8..468ec05 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pci.c,v 1.77 1997/06/25 20:56:29 fsmp Exp $ + * $Id: pci.c,v 1.78 1997/08/02 14:33:12 bde Exp $ * */ @@ -569,7 +569,7 @@ static unsigned pci_dev_list_size; static struct cdevsw pcicdev = { pci_open, pci_close, noread, nowrite, pci_ioctl, nostop, noreset, - nodevtotty, noselect, nommap, nostrategy, "pci", 0, PCI_CDEV + nodevtotty, seltrue, nommap, nostrategy, "pci", 0, PCI_CDEV }; #ifdef DEVFS diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c index 8a721e0..541e3f5 100644 --- a/sys/dev/rc/rc.c +++ b/sys/dev/rc/rc.c @@ -107,7 +107,7 @@ static d_devtotty_t rcdevtotty; static struct cdevsw rc_cdevsw = { rcopen, rcclose, rcread, rcwrite, /*63*/ rcioctl, rcstop, noreset, rcdevtotty,/* rc */ - ttselect, nommap, NULL, "rc", NULL, -1 }; + ttpoll, nommap, NULL, "rc", NULL, -1 }; /* Per-board structure */ static struct rc_softc { diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c index 8b0ef3e..0403e89 100644 --- a/sys/dev/rp/rp.c +++ b/sys/dev/rp/rp.c @@ -801,7 +801,7 @@ static d_devtotty_t rpdevtotty; static struct cdevsw rp_cdevsw = { rpopen, rpclose, rpread, rpwrite, rpioctl, rpstop, noreset, rpdevtotty, - ttselect, nommap, NULL, driver_name, + ttpoll, nommap, NULL, driver_name, NULL, -1}; static int rp_controller_port = 0; diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c index 86b9de4..bd756a3 100644 --- a/sys/dev/si/si.c +++ b/sys/dev/si/si.c @@ -30,7 +30,7 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN * NO EVENT SHALL THE AUTHORS BE LIABLE. * - * $Id: si.c,v 1.58 1997/04/20 15:36:04 bde Exp $ + * $Id: si.c,v 1.59 1997/07/20 14:10:11 bde Exp $ */ #ifndef lint @@ -122,7 +122,7 @@ static d_devtotty_t sidevtotty; static struct cdevsw si_cdevsw = { siopen, siclose, siread, siwrite, /*68*/ siioctl, sistop, noreset, sidevtotty,/* si */ - ttselect, nommap, NULL, "si", NULL, -1 }; + ttpoll, nommap, NULL, "si", NULL, -1 }; #ifdef SI_DEBUG /* use: ``options "SI_DEBUG"'' in your config file */ diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index 5cf4f65..d7bebbb 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.11 1997/09/01 07:37:01 smp Exp smp $ + * $Id: sio.c,v 1.180 1997/09/01 07:45:28 fsmp Exp $ */ #include "opt_comconsole.h" @@ -348,7 +348,7 @@ static d_devtotty_t siodevtotty; static struct cdevsw sio_cdevsw = { sioopen, sioclose, sioread, siowrite, sioioctl, siostop, noreset, siodevtotty, - ttselect, nommap, NULL, driver_name, + ttpoll, nommap, NULL, driver_name, NULL, -1, }; diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 25bf831..d9fe634 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.230 1997/08/09 19:24:03 sos Exp $ + * $Id: syscons.c,v 1.231 1997/09/04 23:01:03 yokota Exp $ */ #include "sc.h" @@ -250,7 +250,7 @@ static d_mmap_t scmmap; static struct cdevsw scdevsw = { scopen, scclose, scread, scwrite, scioctl, nullstop, noreset, scdevtotty, - ttselect, scmmap, nostrategy, "sc", NULL, -1 }; + ttpoll, scmmap, nostrategy, "sc", NULL, -1 }; /* * These functions need to be before calls to them so they can be inlined. |