dispatch PUFFS_VN_POLL
This commit is contained in:
parent
9d9f624f97
commit
75bb6c40b0
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dispatcher.c,v 1.3 2007/05/15 13:44:46 pooka Exp $ */
|
||||
/* $NetBSD: dispatcher.c,v 1.4 2007/05/18 13:53:54 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006, 2007 Antti Kantee. All Rights Reserved.
|
||||
@ -33,10 +33,11 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if !defined(lint)
|
||||
__RCSID("$NetBSD: dispatcher.c,v 1.3 2007/05/15 13:44:46 pooka Exp $");
|
||||
__RCSID("$NetBSD: dispatcher.c,v 1.4 2007/05/18 13:53:54 pooka Exp $");
|
||||
#endif /* !lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/poll.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
@ -796,6 +797,24 @@ puffs_calldispatcher(struct puffs_cc *pcc)
|
||||
break;
|
||||
}
|
||||
|
||||
case PUFFS_VN_POLL:
|
||||
{
|
||||
struct puffs_vnreq_poll *auxt = auxbuf;
|
||||
if (pops->puffs_node_poll == NULL) {
|
||||
error = 0;
|
||||
|
||||
/* emulate genfs_poll() */
|
||||
auxt->pvnr_events &= (POLLIN | POLLOUT
|
||||
| POLLRDNORM | POLLWRNORM);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
error = pops->puffs_node_poll(pcc,
|
||||
opcookie, &auxt->pvnr_events, auxt->pvnr_pid);
|
||||
break;
|
||||
}
|
||||
|
||||
/* holy bitrot, ryydman! */
|
||||
#if 0
|
||||
case PUFFS_VN_IOCTL:
|
||||
@ -893,19 +912,6 @@ processresult(struct puffs_cc *pcc, struct puffs_putreq *ppr, int how)
|
||||
|
||||
|
||||
#if 0
|
||||
case PUFFS_VN_POLL:
|
||||
{
|
||||
struct puffs_vnreq_poll *auxt = auxbuf;
|
||||
if (pops->puffs_node_poll == NULL) {
|
||||
error = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
error = pops->puffs_node_poll(pcc,
|
||||
opcookie, preq-);
|
||||
break;
|
||||
}
|
||||
|
||||
case PUFFS_VN_KQFILTER:
|
||||
{
|
||||
struct puffs_vnreq_kqfilter *auxt = auxbuf;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: puffs.h,v 1.58 2007/05/17 14:03:13 pooka Exp $ */
|
||||
/* $NetBSD: puffs.h,v 1.59 2007/05/18 13:53:54 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved.
|
||||
@ -170,8 +170,7 @@ struct puffs_ops {
|
||||
void *, struct vattr *, const struct puffs_cred *, pid_t);
|
||||
int (*puffs_node_setattr)(struct puffs_cc *,
|
||||
void *, const struct vattr *, const struct puffs_cred *, pid_t);
|
||||
int (*puffs_node_poll)(struct puffs_cc *,
|
||||
void *, struct puffs_vnreq_poll *);
|
||||
int (*puffs_node_poll)(struct puffs_cc *, void *, int *, pid_t);
|
||||
int (*puffs_node_mmap)(struct puffs_cc *,
|
||||
void *, int, const struct puffs_cred *, pid_t);
|
||||
int (*puffs_node_fsync)(struct puffs_cc *,
|
||||
@ -300,8 +299,7 @@ enum {
|
||||
int fsname##_node_setattr(struct puffs_cc *, \
|
||||
void *, const struct vattr *, const struct puffs_cred *, \
|
||||
pid_t); \
|
||||
int fsname##_node_poll(struct puffs_cc *, \
|
||||
void *, struct puffs_vnreq_poll *); \
|
||||
int fsname##_node_poll(struct puffs_cc *, void *, int *,pid_t); \
|
||||
int fsname##_node_mmap(struct puffs_cc *, \
|
||||
void *, int, const struct puffs_cred *, pid_t); \
|
||||
int fsname##_node_fsync(struct puffs_cc *, \
|
||||
|
Loading…
Reference in New Issue
Block a user