Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/kqueue]: src/sys use (intptr_t) rathern than (u_long) to cast kn_hook po...
details: https://anonhg.NetBSD.org/src/rev/cefca4aee0df
branches: kqueue
changeset: 512542:cefca4aee0df
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Wed Oct 02 21:51:39 2002 +0000
description:
use (intptr_t) rathern than (u_long) to cast kn_hook pointer to dev_t
use (void *)(intptr_t) to cast dev_t to kn_hook pointer
diffstat:
sys/arch/hp300/dev/hil.c | 10 +++++-----
sys/dev/qbus/qd.c | 12 ++++++------
2 files changed, 11 insertions(+), 11 deletions(-)
diffs (99 lines):
diff -r c4ae4875d5ba -r cefca4aee0df sys/arch/hp300/dev/hil.c
--- a/sys/arch/hp300/dev/hil.c Wed Oct 02 21:27:08 2002 +0000
+++ b/sys/arch/hp300/dev/hil.c Wed Oct 02 21:51:39 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hil.c,v 1.42.2.7 2002/09/06 08:34:59 jdolecek Exp $ */
+/* $NetBSD: hil.c,v 1.42.2.8 2002/10/02 21:51:39 jdolecek Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hil.c,v 1.42.2.7 2002/09/06 08:34:59 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hil.c,v 1.42.2.8 2002/10/02 21:51:39 jdolecek Exp $");
#include "opt_compat_hpux.h"
#include "rnd.h"
@@ -841,7 +841,7 @@
static void
filt_hilrdetach(struct knote *kn)
{
- dev_t dev = (u_long) kn->kn_hook;
+ dev_t dev = (intptr_t) kn->kn_hook;
struct hil_softc *hilp = hil_cd.cd_devs[HILLOOP(dev)];
struct hilloopdev *dptr = &hilp->hl_device[HILUNIT(dev)];
int s;
@@ -854,7 +854,7 @@
static int
filt_hilread(struct knote *kn, long hint)
{
- dev_t dev = (u_long) kn->kn_hook;
+ dev_t dev = (intptr_t) kn->kn_hook;
int device = HILUNIT(dev);
struct hil_softc *hilp = hil_cd.cd_devs[HILLOOP(dev)];
struct hilloopdev *dptr = &hilp->hl_device[device];
@@ -932,7 +932,7 @@
return (1);
}
- kn->kn_hook = (caddr_t)(u_long) dev; /* XXX yuck */
+ kn->kn_hook = (void *)(intptr_t) dev; /* XXX yuck */
s = splhil();
SLIST_INSERT_HEAD(klist, kn, kn_selnext);
diff -r c4ae4875d5ba -r cefca4aee0df sys/dev/qbus/qd.c
--- a/sys/dev/qbus/qd.c Wed Oct 02 21:27:08 2002 +0000
+++ b/sys/dev/qbus/qd.c Wed Oct 02 21:51:39 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: qd.c,v 1.22.2.4 2002/06/23 17:48:31 jdolecek Exp $ */
+/* $NetBSD: qd.c,v 1.22.2.5 2002/10/02 21:51:40 jdolecek Exp $ */
/*-
* Copyright (c) 1988 Regents of the University of California.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: qd.c,v 1.22.2.4 2002/06/23 17:48:31 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: qd.c,v 1.22.2.5 2002/10/02 21:51:40 jdolecek Exp $");
#include "opt_ddb.h"
@@ -1553,7 +1553,7 @@
static void
filt_qdrdetach(struct knote *kn)
{
- dev_t dev = (u_long) kn->kn_hook;
+ dev_t dev = (intptr_t) kn->kn_hook;
u_int minor_dev = minor(dev);
int unit = minor_dev >> 2;
int s;
@@ -1566,7 +1566,7 @@
static int
filt_qdread(struct knote *kn, long hint)
{
- dev_t dev = (u_long) kn->kn_hook;
+ dev_t dev = (intptr_t) kn->kn_hook;
u_int minor_dev = minor(dev);
int unit = minor_dev >> 2;
@@ -1580,7 +1580,7 @@
static int
filt_qdwrite(struct knote *kn, long hint)
{
- dev_t dev = (u_long) kn->kn_hook;
+ dev_t dev = (intptr_t) kn->kn_hook;
u_int minor_dev = minor(dev);
int unit = minor_dev >> 2;
@@ -1624,7 +1624,7 @@
return (1);
}
- kn->kn_hook = (caddr_t)(u_long) dev;
+ kn->kn_hook = (void *)(intptr_t) dev;
s = spl5();
SLIST_INSERT_HEAD(klist, kn, kn_selnext);
Home |
Main Index |
Thread Index |
Old Index