Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libpuffs Adjust to prototype.



details:   https://anonhg.NetBSD.org/src/rev/a94c654e827d
branches:  trunk
changeset: 824308:a94c654e827d
user:      christos <christos%NetBSD.org@localhost>
date:      Wed May 31 17:56:00 2017 +0000

description:
Adjust to prototype.

diffstat:

 lib/libpuffs/framebuf.c |  14 +++++++-------
 lib/libpuffs/puffs.c    |  12 ++++++------
 2 files changed, 13 insertions(+), 13 deletions(-)

diffs (108 lines):

diff -r aaa855102f7a -r a94c654e827d lib/libpuffs/framebuf.c
--- a/lib/libpuffs/framebuf.c   Wed May 31 14:41:07 2017 +0000
+++ b/lib/libpuffs/framebuf.c   Wed May 31 17:56:00 2017 +0000
@@ -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 @@
        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 @@
                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 @@
 
        /* 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 @@
        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)
diff -r aaa855102f7a -r a94c654e827d lib/libpuffs/puffs.c
--- a/lib/libpuffs/puffs.c      Wed May 31 14:41:07 2017 +0000
+++ b/lib/libpuffs/puffs.c      Wed May 31 17:56:00 2017 +0000
@@ -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 @@
                        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 @@
 
        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++) {



Home | Main Index | Thread Index | Old Index