Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/kqueue]: src/sys/arch Add kqueue support (not yet compiled).
details: https://anonhg.NetBSD.org/src/rev/b9fe552c280d
branches: kqueue
changeset: 512425:b9fe552c280d
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sun Sep 09 19:10:30 2001 +0000
description:
Add kqueue support (not yet compiled).
diffstat:
sys/arch/amiga/dev/kbd.c | 10 +++++++++-
sys/arch/amiga/dev/ms.c | 14 +++++++++++++-
sys/arch/atari/dev/kbd.c | 15 +++++++++------
sys/arch/atari/dev/ms.c | 17 +++++++++++------
sys/arch/x68k/dev/kbd.c | 18 +++++++++++-------
sys/arch/x68k/dev/ms.c | 10 +++++++++-
6 files changed, 62 insertions(+), 22 deletions(-)
diffs (185 lines):
diff -r 9e73a9382d55 -r b9fe552c280d sys/arch/amiga/dev/kbd.c
--- a/sys/arch/amiga/dev/kbd.c Sun Sep 09 18:48:41 2001 +0000
+++ b/sys/arch/amiga/dev/kbd.c Sun Sep 09 19:10:30 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kbd.c,v 1.35 2001/02/02 21:52:11 is Exp $ */
+/* $NetBSD: kbd.c,v 1.35.4.1 2001/09/09 19:10:30 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -507,6 +507,14 @@
return ev_poll (&kbd_softc.k_events, events, p);
}
+int
+kbdkqfilter(dev, kn)
+ dev_t dev;
+ struct knote *kn;
+{
+
+ return (ev_kqfilter(&kbd_softc.k_events, kn));
+}
void
kbdintr(mask)
diff -r 9e73a9382d55 -r b9fe552c280d sys/arch/amiga/dev/ms.c
--- a/sys/arch/amiga/dev/ms.c Sun Sep 09 18:48:41 2001 +0000
+++ b/sys/arch/amiga/dev/ms.c Sun Sep 09 19:10:30 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ms.c,v 1.18 2000/05/18 19:58:30 is Exp $ */
+/* $NetBSD: ms.c,v 1.18.8.1 2001/09/09 19:10:30 thorpej Exp $ */
/*
* based on:
@@ -459,3 +459,15 @@
return(ev_poll(&ms->ms_events, events, p));
}
+
+int
+mskqfilter(dev, kn)
+ dev_t dev;
+ struct knote *kn;
+{
+ struct ms_port *ms;
+
+ ms = MS_DEV2MSPORT(dev);
+
+ return (ev_kqfilter(&ms->ms_events, kn));
+}
diff -r 9e73a9382d55 -r b9fe552c280d sys/arch/atari/dev/kbd.c
--- a/sys/arch/atari/dev/kbd.c Sun Sep 09 18:48:41 2001 +0000
+++ b/sys/arch/atari/dev/kbd.c Sun Sep 09 19:10:30 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kbd.c,v 1.18 1999/08/06 08:27:31 leo Exp $ */
+/* $NetBSD: kbd.c,v 1.18.16.1 2001/09/09 19:12:35 thorpej Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman
@@ -71,11 +71,7 @@
static struct kbd_softc kbd_softc;
/* {b,c}devsw[] function prototypes */
-dev_type_open(kbdopen);
-dev_type_close(kbdclose);
-dev_type_read(kbdread);
-dev_type_ioctl(kbdioctl);
-dev_type_poll(kbdpoll);
+cdev_decl(kbd);
/* Interrupt handler */
void kbdintr __P((int));
@@ -262,6 +258,13 @@
return ev_poll (&kbd_softc.k_events, events, p);
}
+int
+kbdkqfilter(dev_t dev, struct knote *kn)
+{
+
+ return (ev_kqfilter(&kbd_softc.k_events, kn));
+}
+
/*
* Keyboard interrupt handler called straight from MFP at spl6.
*/
diff -r 9e73a9382d55 -r b9fe552c280d sys/arch/atari/dev/ms.c
--- a/sys/arch/atari/dev/ms.c Sun Sep 09 18:48:41 2001 +0000
+++ b/sys/arch/atari/dev/ms.c Sun Sep 09 19:10:30 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ms.c,v 1.10 2000/03/23 06:36:04 thorpej Exp $ */
+/* $NetBSD: ms.c,v 1.10.8.1 2001/09/09 19:12:35 thorpej Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman.
@@ -84,11 +84,7 @@
static struct ms_softc ms_softc[NMOUSE];
-dev_type_open(msopen);
-dev_type_close(msclose);
-dev_type_read(msread);
-dev_type_ioctl(msioctl);
-dev_type_poll(mspoll);
+cdev_decl(ms);
static void ms_3b_delay __P((struct ms_softc *));
@@ -419,4 +415,13 @@
ms = &ms_softc[minor(dev)];
return(ev_poll(&ms->ms_events, events, p));
}
+
+int
+mskqfilter(dev_t dev, struct knote *kn)
+{
+ struct ms_softc *ms;
+
+ ms = &ms_softc[minor(dev)];
+ return (ev_kqfilter(&ms->ms_events, kn));
+}
#endif /* NMOUSE > 0 */
diff -r 9e73a9382d55 -r b9fe552c280d sys/arch/x68k/dev/kbd.c
--- a/sys/arch/x68k/dev/kbd.c Sun Sep 09 18:48:41 2001 +0000
+++ b/sys/arch/x68k/dev/kbd.c Sun Sep 09 19:10:30 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kbd.c,v 1.11 2001/06/12 15:17:21 wiz Exp $ */
+/* $NetBSD: kbd.c,v 1.11.2.1 2001/09/09 19:14:39 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -70,13 +70,9 @@
struct evvar sc_events; /* event queue state */
};
+cdev_decl(kbd);
+
void kbdenable __P((int));
-int kbdopen __P((dev_t, int, int, struct proc *));
-int kbdclose __P((dev_t, int, int, struct proc *));
-int kbdread __P((dev_t, struct uio *, int));
-int kbdwrite __P((dev_t, struct uio *, int));
-int kbdioctl __P((dev_t, u_long, caddr_t, int, struct proc *));
-int kbdpoll __P((dev_t, int, struct proc *));
int kbdintr __P((void *));
void kbdsoftint __P((void));
void kbd_bell __P((int));
@@ -315,6 +311,14 @@
return (ev_poll(&k->sc_events, events, p));
}
+int
+kbdkqfilter(dev_t dev, struct knote *kn)
+{
+ struct kbd_softc *k;
+
+ k = kbd_cd.cd_devs[minor(dev)];
+ return (ev_kqfilter(&k->sc_events, kn));
+}
#define KBDBUFMASK 63
#define KBDBUFSIZ 64
diff -r 9e73a9382d55 -r b9fe552c280d sys/arch/x68k/dev/ms.c
--- a/sys/arch/x68k/dev/ms.c Sun Sep 09 18:48:41 2001 +0000
+++ b/sys/arch/x68k/dev/ms.c Sun Sep 09 19:10:30 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ms.c,v 1.10 2000/03/23 06:47:33 thorpej Exp $ */
+/* $NetBSD: ms.c,v 1.10.8.1 2001/09/09 19:14:39 thorpej Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -339,6 +339,14 @@
return (ev_poll(&ms->ms_events, events, p));
}
+int
+mskqfilter(dev_t dev, struct knote *kn)
+{
+ struct ms_softc *ms;
+
+ ms = ms_cd.cd_devs[minor(dev)];
+ return (ev_kqfilter(&ms->ms_events, kn));
+}
/****************************************************************
* Middle layer (translator)
Home |
Main Index |
Thread Index |
Old Index