poll(2) changes for framebuffer.

This commit is contained in:
mhitch 1996-10-12 16:00:21 +00:00
parent b403f60a0e
commit 784dc6bd1b
2 changed files with 10 additions and 11 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: fb.c,v 1.13 1996/10/11 00:44:49 christos Exp $ */
/* $NetBSD: fb.c,v 1.14 1996/10/12 16:00:21 mhitch Exp $ */
/*-
* Copyright (c) 1992, 1993
@ -65,6 +65,7 @@
#include <sys/systm.h>
#include <sys/ioctl.h>
#include <sys/device.h>
#include <sys/poll.h>
#include <sys/tty.h>
#include <sys/time.h>
#include <sys/kernel.h>

View File

@ -203,23 +203,21 @@ fbioctl(dev, cmd, data, flag, p)
* Select on Digital-OS-compatible in-kernel input-event ringbuffer.
*/
int
fbselect(dev, flag, p)
fbpoll(dev, events, p)
dev_t dev;
int flag;
int events;
struct proc *p;
{
struct fbinfo *fi = fbcd.cd_devs[minor(dev)];
int revents = 0;
switch (flag) {
case FREAD:
if (events & (POLLIN | POLLRDNORM))
if (fi->fi_fbu->scrInfo.qe.eHead !=
fi->fi_fbu->scrInfo.qe.eTail)
return (1);
selrecord(p, &fi->fi_selp);
break;
}
return (0);
revents |= events & (POLLIN | POLLRDNORM);
else
selrecord(p, &fi->fi_selp);
return (revents);
}
/*