Ejemplo n.º 1
0
/* ARGSUSED */
static int
cnpoll(dev_t dev, short events, int anyyet, short *reventsp,
	struct pollhead **phpp)
{
	if (rconsvp == NULL)
		return (nochpoll(dev, events, anyyet, reventsp, phpp));

	if (rconsvp->v_stream != NULL)
		return (strpoll(rconsvp->v_stream, events, anyyet, reventsp,
		    phpp));
	else
		return (cdev_poll(rconsdev, events, anyyet, reventsp, phpp));
}
Ejemplo n.º 2
0
/*ARGSUSED*/
int
cnpoll(dev_t dev, int events, struct lwp *l)
{
	int error;

	/*
	 * Redirect the poll, if that's appropriate.
	 * I don't want to think of the possible side effects
	 * of console redirection here.
	 */
	if (!cn_redirect(&dev, 0, &error))
		return POLLHUP;
	return cdev_poll(dev, events, l);
}
Ejemplo n.º 3
0
int
ptyfs_poll(void *v)
{
	struct vop_poll_args /* {
		struct vnode *a_vp;
		int a_events;
	} */ *ap = v;
	struct vnode *vp = ap->a_vp;
	struct ptyfsnode *ptyfs = VTOPTYFS(vp);

	switch (ptyfs->ptyfs_type) {
	case PTYFSpts:
	case PTYFSptc:
		return cdev_poll(vp->v_rdev, ap->a_events, curlwp);
	default:
		return genfs_poll(v);
	}
}