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/kern/vfs_vnops.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/kern/vfs_vnops.c')
-rw-r--r-- | sys/kern/vfs_vnops.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 04354256017..bcef263c4a9 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_vnops.c,v 1.43 2003/07/21 22:44:50 tedu Exp $ */ +/* $OpenBSD: vfs_vnops.c,v 1.44 2003/09/23 16:51:12 millert Exp $ */ /* $NetBSD: vfs_vnops.c,v 1.20 1996/02/04 02:18:41 christos Exp $ */ /* @@ -50,6 +50,7 @@ #include <sys/ioctl.h> #include <sys/tty.h> #include <sys/cdio.h> +#include <sys/poll.h> #include <uvm/uvm_extern.h> @@ -57,14 +58,14 @@ int vn_read(struct file *fp, off_t *off, struct uio *uio, struct ucred *cred); int vn_write(struct file *fp, off_t *off, struct uio *uio, struct ucred *cred); -int vn_select(struct file *fp, int which, struct proc *p); +int vn_poll(struct file *fp, int events, struct proc *p); int vn_kqfilter(struct file *fp, struct knote *kn); int vn_closefile(struct file *fp, struct proc *p); int vn_ioctl(struct file *fp, u_long com, caddr_t data, struct proc *p); struct fileops vnops = - { vn_read, vn_write, vn_ioctl, vn_select, vn_kqfilter, vn_statfile, + { vn_read, vn_write, vn_ioctl, vn_poll, vn_kqfilter, vn_statfile, vn_closefile }; /* @@ -467,17 +468,16 @@ vn_ioctl(fp, com, data, p) } /* - * File table vnode select routine. + * File table vnode poll routine. */ int -vn_select(fp, which, p) +vn_poll(fp, events, p) struct file *fp; - int which; + int events; struct proc *p; { - return (VOP_SELECT(((struct vnode *)fp->f_data), which, fp->f_flag, - fp->f_cred, p)); + return (VOP_POLL(((struct vnode *)fp->f_data), events, p)); } /* |