Adjust to prototype.

This commit is contained in:
christos 2017-05-31 17:56:00 +00:00
parent fb5aa4f691
commit 79e2355ab8
2 changed files with 13 additions and 13 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: framebuf.c,v 1.33 2017/05/09 21:15:30 christos Exp $ */
/* $NetBSD: framebuf.c,v 1.34 2017/05/31 17:56:00 christos Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if !defined(lint)
__RCSID("$NetBSD: framebuf.c,v 1.33 2017/05/09 21:15:30 christos Exp $");
__RCSID("$NetBSD: framebuf.c,v 1.34 2017/05/31 17:56:00 christos Exp $");
#endif /* !lint */
#include <sys/types.h>
@ -559,7 +559,7 @@ puffs_framev_enqueue_waitevent(struct puffs_cc *pcc, int fd, int *what)
if (*what & PUFFS_FBIO_READ)
if ((fio->stat & FIO_ENABLE_R) == 0)
EV_SET(&kev, fd, EVFILT_READ, EV_ENABLE,
0, 0, (uintptr_t)fio);
0, 0, (intptr_t)fio);
if (kevent(pu->pu_kq, &kev, 1, NULL, 0, NULL) == -1)
return -1;
@ -578,7 +578,7 @@ puffs_framev_enqueue_waitevent(struct puffs_cc *pcc, int fd, int *what)
fio->rwait--;
if (fio->rwait == 0 && (fio->stat & FIO_ENABLE_R) == 0) {
EV_SET(&kev, fd, EVFILT_READ, EV_DISABLE,
0, 0, (uintptr_t)fio);
0, 0, (intptr_t)fio);
rv = kevent(pu->pu_kq, &kev, 1, NULL, 0, NULL);
#if 0
if (rv != 0)
@ -869,7 +869,7 @@ puffs_framev_enablefd(struct puffs_usermount *pu, int fd, int what)
/* write is enabled in the event loop if there is output */
if (what & PUFFS_FBIO_READ && fio->rwait == 0) {
EV_SET(&kev, fd, EVFILT_READ, EV_ENABLE, 0, 0, (uintptr_t)fio);
EV_SET(&kev, fd, EVFILT_READ, EV_ENABLE, 0, 0, (intptr_t)fio);
rv = kevent(pu->pu_kq, &kev, 1, NULL, 0, NULL);
}
@ -902,12 +902,12 @@ puffs_framev_disablefd(struct puffs_usermount *pu, int fd, int what)
i = 0;
if (what & PUFFS_FBIO_READ && fio->rwait == 0) {
EV_SET(&kev[0], fd,
EVFILT_READ, EV_DISABLE, 0, 0, (uintptr_t)fio);
EVFILT_READ, EV_DISABLE, 0, 0, (intptr_t)fio);
i++;
}
if (what & PUFFS_FBIO_WRITE && fio->stat & FIO_WR && fio->wwait == 0) {
EV_SET(&kev[1], fd,
EVFILT_WRITE, EV_DISABLE, 0, 0, (uintptr_t)fio);
EVFILT_WRITE, EV_DISABLE, 0, 0, (intptr_t)fio);
i++;
}
if (i)

View File

@ -1,4 +1,4 @@
/* $NetBSD: puffs.c,v 1.120 2015/06/17 00:15:26 christos Exp $ */
/* $NetBSD: puffs.c,v 1.121 2017/05/31 17:56:00 christos Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved.
@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#if !defined(lint)
__RCSID("$NetBSD: puffs.c,v 1.120 2015/06/17 00:15:26 christos Exp $");
__RCSID("$NetBSD: puffs.c,v 1.121 2017/05/31 17:56:00 christos Exp $");
#endif /* !lint */
#include <sys/param.h>
@ -846,14 +846,14 @@ puffs__theloop(struct puffs_cc *pcc)
if (FIO_EN_WRITE(fio)) {
EV_SET(&pu->pu_evs[nchanges], fio->io_fd,
EVFILT_WRITE, EV_ENABLE, 0, 0,
(uintptr_t)fio);
(intptr_t)fio);
fio->stat |= FIO_WR;
nchanges++;
}
if (FIO_RM_WRITE(fio)) {
EV_SET(&pu->pu_evs[nchanges], fio->io_fd,
EVFILT_WRITE, EV_DISABLE, 0, 0,
(uintptr_t)fio);
(intptr_t)fio);
fio->stat &= ~FIO_WR;
nchanges++;
}
@ -967,10 +967,10 @@ puffs_mainloop(struct puffs_usermount *pu)
LIST_FOREACH(fio, &pu->pu_ios, fio_entries) {
EV_SET(curev, fio->io_fd, EVFILT_READ, EV_ADD,
0, 0, (uintptr_t)fio);
0, 0, (intptr_t)fio);
curev++;
EV_SET(curev, fio->io_fd, EVFILT_WRITE, EV_ADD | EV_DISABLE,
0, 0, (uintptr_t)fio);
0, 0, (intptr_t)fio);
curev++;
}
for (i = 0; i < NSIG; i++) {