diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2003-09-23 16:51:15 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2003-09-23 16:51:15 +0000 |
commit | 6bb276a1685d8546283d224a3d249c66cc329264 (patch) | |
tree | 5e1c80d6cad38a8a82f5832e1e315103e7029eb9 /sys/arch/mac68k/dev/asc.c | |
parent | 96675671ec2520ade2f83b31563ab4da72bd443d (diff) |
Replace select backends with poll backends. selscan() and pollscan()
now call the poll backend. With this change we implement greater
poll(2) functionality instead of emulating it via the select backend.
Adapted from NetBSD and including some changes from FreeBSD.
Tested by many, deraadt@ OK
Diffstat (limited to 'sys/arch/mac68k/dev/asc.c')
-rw-r--r-- | sys/arch/mac68k/dev/asc.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/sys/arch/mac68k/dev/asc.c b/sys/arch/mac68k/dev/asc.c index 95bdb93b8a8..87950d796f3 100644 --- a/sys/arch/mac68k/dev/asc.c +++ b/sys/arch/mac68k/dev/asc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asc.c,v 1.15 2002/06/24 22:14:47 miod Exp $ */ +/* $OpenBSD: asc.c,v 1.16 2003/09/23 16:51:11 millert Exp $ */ /* $NetBSD: asc.c,v 1.20 1997/02/24 05:47:33 scottr Exp $ */ /* @@ -76,6 +76,7 @@ #include <sys/param.h> #include <sys/device.h> #include <sys/fcntl.h> +#include <sys/poll.h> #include <sys/timeout.h> #include <uvm/uvm_extern.h> @@ -255,21 +256,13 @@ ascioctl(dev, cmd, data, flag, p) } int -ascselect(dev, rw, p) +ascpoll(dev, events, p) dev_t dev; - int rw; + int events; struct proc *p; { - switch (rw) { - case FREAD: - break; - - case FWRITE: - return (1); /* always fails => never blocks */ - break; - } - - return (0); + /* always fails => never blocks */ + return (events & (POLLOUT | POLLWRNORM)); } paddr_t |