Implement poll(2).

This commit is contained in:
scottr 1996-09-14 05:54:53 +00:00
parent 4ddcca6bc8
commit 81543dc7c9
2 changed files with 7 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf.c,v 1.35 1996/08/05 01:26:31 scottr Exp $ */
/* $NetBSD: grf.c,v 1.36 1996/09/14 05:54:54 scottr Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -55,6 +55,7 @@
#include <sys/file.h>
#include <sys/malloc.h>
#include <sys/mman.h>
#include <sys/poll.h>
#include <sys/proc.h>
#include <sys/vnode.h>
#include <sys/systm.h>
@ -257,14 +258,12 @@ grfioctl(dev, cmd, data, flag, p)
/*ARGSUSED*/
int
grfselect(dev, rw, p)
grfpoll(dev, events, p)
dev_t dev;
int rw;
int events;
struct proc *p;
{
if (rw == FREAD)
return (0);
return (1);
return (events & (POLLOUT | POLLWRNORM));
}
/*ARGSUSED*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: grfvar.h,v 1.12 1996/09/14 05:43:24 scottr Exp $ */
/* $NetBSD: grfvar.h,v 1.13 1996/09/14 05:54:53 scottr Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -135,7 +135,7 @@ struct image_data {
int grfopen __P((dev_t dev, int flag, int mode, struct proc *p));
int grfclose __P((dev_t dev, int flag, int mode, struct proc *p));
int grfioctl __P((dev_t, int, caddr_t, int, struct proc *p));
int grfselect __P((dev_t dev, int rw, struct proc *p));
int grfpoll __P((dev_t dev, int events, struct proc *p));
int grfmmap __P((dev_t dev, int off, int prot));
int grfon __P((dev_t dev));
int grfoff __P((dev_t dev));