summaryrefslogtreecommitdiff
path: root/i386/i386at
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2006-11-12 23:45:07 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:26:55 +0200
commitf387d24c7d59cfd219c3b795a512981347240380 (patch)
treeab4de90e9d7089f3ad6fecb377dcee6911ca623a /i386/i386at
parent405015d2d717999fb9ef543f304a42a5435a67c1 (diff)
2006-11-13 Barry deFreese <bddebian@comcast.net>
* i386/i386/locore.h: New file. * i386/i386/pcb.h: New file. * i386/i386/pcb.c: Include `pcb.h'. * i386/i386/pit.c (clkstart): Fix type of s into unsigned long. * i386/i386/spl.h (spl0, splsched, splx, splsoftclock, splon, sploff) (splhigh, splimp, spltty, splclock, setsoftclock): Add prototype. * i386/i386at/kd_event.h: New file. * i386/i386at/kd_event.c: Include `kd_event.h'. * i386/i386at/kd_mouse.h: New file. * i386/i386at/kd_mouse.c: Include `kd_mouse.h'. (mouseclose): Fix call of `serial_mouse_close' function. * i386/i386at/kd.c: Include `kd_event.h' and `kd_mouse.h'. * i386/i386at/kd.h (splx, spltty): Remove prototypes.h * i386/i386at/lpr.c: Likewise. * ipc/mach_msg.c: Include `machine/locore.h' and `machine/pcb.h'. * kern/mach_clock.h: New file. * kern/mach_clock.c: Include `kern/queue.h', `kern/timer.h' and `mach_clock.h'. * kern/mach_factor.h: New file. * kern/mach_factor.c: Include `mach_factor.h'. * kern/sched_prim.c: Include `kern/mach_factor.h'. * kern/thread.c: Include `machine/pcb.h'.
Diffstat (limited to 'i386/i386at')
-rw-r--r--i386/i386at/kd.c2
-rw-r--r--i386/i386at/kd.h2
-rw-r--r--i386/i386at/kd_event.c2
-rw-r--r--i386/i386at/kd_event.h33
-rw-r--r--i386/i386at/kd_mouse.c4
-rw-r--r--i386/i386at/kd_mouse.h57
-rw-r--r--i386/i386at/lpr.c2
7 files changed, 97 insertions, 5 deletions
diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c
index b8249c2..144b87a 100644
--- a/i386/i386at/kd.c
+++ b/i386/i386at/kd.c
@@ -91,6 +91,8 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <i386/pio.h>
#include <i386at/cram.h>
#include <i386at/kd.h>
+#include <i386at/kd_event.h>
+#include <i386at/kd_mouse.h>
#include <i386at/kdsoft.h>
#include <device/cons.h>
diff --git a/i386/i386at/kd.h b/i386/i386at/kd.h
index 9abea8e..2e8f831 100644
--- a/i386/i386at/kd.h
+++ b/i386/i386at/kd.h
@@ -567,8 +567,6 @@ extern u_char key_map[NUMKEYS][WIDTH_KMAP];
#ifdef KERNEL
#include <i386/machspl.h>
-extern void splx();
-extern spl_t spltty();
#define SPLKD spltty
#endif /* KERNEL */
diff --git a/i386/i386at/kd_event.c b/i386/i386at/kd_event.c
index ff70ce0..993dc44 100644
--- a/i386/i386at/kd_event.c
+++ b/i386/i386at/kd_event.c
@@ -77,6 +77,8 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <i386at/kd.h>
#include <i386at/kd_queue.h>
+#include "kd_event.h"
+
/*
* Code for /dev/kbd. The interrupt processing is done in kd.c,
* which calls into this module to enqueue scancode events when
diff --git a/i386/i386at/kd_event.h b/i386/i386at/kd_event.h
new file mode 100644
index 0000000..677af99
--- /dev/null
+++ b/i386/i386at/kd_event.h
@@ -0,0 +1,33 @@
+/*
+ * Keyboard event handlers
+ * Copyright (C) 2006 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Author: Barry deFreese.
+ */
+/*
+ * Keyboard event handling functions.
+ *
+ */
+
+#ifndef _KD_EVENT_H_
+#define _KD_EVENT_H_
+
+extern void X_kdb_enter (void);
+
+extern void X_kdb_exit (void);
+
+#endif /* _KD_EVENT_H_ */
diff --git a/i386/i386at/kd_mouse.c b/i386/i386at/kd_mouse.c
index b02e792..5e8b858 100644
--- a/i386/i386at/kd_mouse.c
+++ b/i386/i386at/kd_mouse.c
@@ -87,6 +87,8 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <i386at/kd_queue.h>
#include <i386at/i8250.h>
+#include "kd_mouse.h"
+
static int (*oldvect)(); /* old interrupt vector */
static int oldunit;
static spl_t oldspl;
@@ -263,7 +265,7 @@ mouseclose(dev, flags)
case MICROSOFT_MOUSE7:
case MOUSE_SYSTEM_MOUSE:
case LOGITECH_TRACKMAN:
- serial_mouse_close(dev);
+ serial_mouse_close(dev, flags);
break;
case IBM_MOUSE:
ibm_ps2_mouse_close(dev);
diff --git a/i386/i386at/kd_mouse.h b/i386/i386at/kd_mouse.h
new file mode 100644
index 0000000..baa51c8
--- /dev/null
+++ b/i386/i386at/kd_mouse.h
@@ -0,0 +1,57 @@
+/*
+ * Mouse event handlers
+ * Copyright (C) 2006 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Author: Barry deFreese.
+ */
+/*
+ * Mouse event handling functions.
+ *
+ */
+
+#ifndef _KD_MOUSE_H_
+#define _KD_MOUSE_H_
+
+#include <sys/types.h>
+
+extern void mouse_button (kev_type which, u_char direction);
+
+extern void mouse_enqueue (kd_event *ev);
+
+extern void mouse_moved (struct mouse_motion where);
+
+extern void mouse_handle_byte (u_char ch);
+
+extern void serial_mouse_open (dev_t dev);
+
+extern void serial_mouse_close (dev_t dev, int flags);
+
+extern void kd_mouse_open (dev_t dev, int mouse_pic);
+
+extern void kd_mouse_close (dev_t dev, int mouse_pic);
+
+extern void ibm_ps2_mouse_open (dev_t dev);
+
+extern void ibm_ps2_mouse_close (dev_t dev);
+
+extern void mouse_packet_microsoft_mouse (u_char *mousebuf);
+
+extern void mouse_packet_mouse_system_mouse (u_char *mousebuf);
+
+extern void mouse_packet_ibm_ps2_mouse (u_char *mousebuf);
+
+#endif /* _KD_MOUSE_H_ */
diff --git a/i386/i386at/lpr.c b/i386/i386at/lpr.c
index d68313d..f2fa032 100644
--- a/i386/i386at/lpr.c
+++ b/i386/i386at/lpr.c
@@ -57,8 +57,6 @@
#include <chips/busses.h>
#include <i386at/lprreg.h>
-extern void splx();
-extern spl_t spltty();
extern void timeout();
extern void ttrstrt();