diff options
author | Marin Ramesa <mpr@hi.t-com.hr> | 2013-11-29 22:53:49 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-12-05 06:15:25 +0900 |
commit | 8c9b556f59821283ca62209efe0a0bf17fad0a49 (patch) | |
tree | 8c28fbccb25a97e610100328ebfde7ae0dcfeeb2 /i386/i386at | |
parent | 3ede362d063931308f469768e27e096bafc34589 (diff) |
i386/i386at/conf.c: remove forward declarations
* i386/Makefrag.am: Include i386/i386at/model_dep.h and i386/i386at/mem.h.
* i386/i386at/com.h (comgetstat, comsetstat): Declare as extern.
(comopen, comclose, comread, comwrite, comportdeath): Add prototypes.
* i386/i386at/conf.c: Include kern/mach_clock.h and i386at/model_dep.h.
(timeopen, timeclose, timemmap): Remove forward declarations.
(kdopen, kdclose, kdread, kdwrite, kdgetstat, kdsetstat, kdportdeath, kdmmap): Likewise.
(comopen, comclose, comread, comwrite, comportdeath, comgetstat, comsetstat): Likewise.
(lpropen, lprclose, lprread, lprwrite, lprportdeath, lprgetstat, lprsetstat): Likewise.
(kbdopen, kbdclose, kbdread, kbdgetstat, kbdsetstat): Likewise.
(mouseopen, mouseclose, mouseread, mousegetstat): Likewise.
(memmmap): Likewise.
(kmsgopen, kmsgclose, kmsgread, kmsggetstat): Likewise.
(hypcnopen, hypcnclose, hypcnread, hypcnwrite, hypcnportdeath, hypcngetstat, hypcnsetstat): Likewise.
Include i386at/kd.h.
Include i386at/com.h.
Include i386at/lpr.h.
Include i386at/kd_event.h.
Include i386at/kd_mouse.h.
Include i386at/mem.h.
Include device/kmsg.h.
Include xen/console.h.
* i386/i386at/kd.h: Include device/io_req.h.
(kdopen, kdclose, kdread, kdwrite, kdgetstat, kdsetstat, kdportdeath, kdmmap): Add prototypes.
* i386/i386at/kd_event.h (kbdopen, kbdclose, kbdread, kbdgetstat, kbdsetstat): Likewise.
* i386/i386at/kd_mouse.h (mouseopen, mouseclose, mouseread, mousegetstat): Likewise.
* i386/i386at/lpr.h (lpropen, lprclose, lprread, lprwrite, lprportdeath): Likewise.
(lprgetstat, lprsetstat): Declare as extern.
* i386/i386at/mem.h: New file.
Add copyright.
[_MEM_H_]: Add ifndef.
(memmmap): Add prototype.
* i386/i386at/model_dep.c: Include i386/i386at/model_dep.h.
(timemmap): Fix argument list.
* i386/i386at/model_dep.h: New file.
Add copyright.
[_MODEL_DEP_H_]: Add ifndef.
(timemmap): Add prototype.
* kern/mach_clock.h (timeopen, timeclose): Add prototypes.
* xen/console.h (hypcnopen, hypcnclose, hypcnread, hypcnwrite, hypcnportdeath, hypcngetstat, hypcnsetstat): Add prototypes.
Diffstat (limited to 'i386/i386at')
-rw-r--r-- | i386/i386at/com.h | 10 | ||||
-rw-r--r-- | i386/i386at/conf.c | 26 | ||||
-rw-r--r-- | i386/i386at/kd.h | 21 | ||||
-rw-r--r-- | i386/i386at/kd_event.h | 16 | ||||
-rw-r--r-- | i386/i386at/kd_mouse.h | 10 | ||||
-rw-r--r-- | i386/i386at/lpr.h | 10 | ||||
-rw-r--r-- | i386/i386at/mem.h | 24 | ||||
-rw-r--r-- | i386/i386at/model_dep.c | 3 | ||||
-rw-r--r-- | i386/i386at/model_dep.h | 26 |
9 files changed, 125 insertions, 21 deletions
diff --git a/i386/i386at/com.h b/i386/i386at/com.h index 7d5ee5e..475fa69 100644 --- a/i386/i386at/com.h +++ b/i386/i386at/com.h @@ -56,18 +56,24 @@ void comstart(struct tty *tp); void comstop(struct tty *tp, int flags); void comattach(struct bus_device *dev); -io_return_t +extern io_return_t comgetstat( dev_t dev, int flavor, int *data, natural_t *count); -io_return_t +extern io_return_t comsetstat( dev_t dev, int flavor, int *data, natural_t count); +extern io_return_t comopen(int dev, int flag, io_req_t ior); +extern io_return_t comclose(int dev, int flag); +extern io_return_t comread(int dev, io_req_t ior); +extern io_return_t comwrite(int dev, io_req_t ior); +extern io_return_t comportdeath(dev_t dev, mach_port_t port); + #endif /* _COM_H_ */ diff --git a/i386/i386at/conf.c b/i386/i386at/conf.c index 83c8dbf..4fcd81e 100644 --- a/i386/i386at/conf.c +++ b/i386/i386at/conf.c @@ -29,48 +29,42 @@ #include <mach/machine/vm_types.h> #include <device/conf.h> +#include <kern/mach_clock.h> +#include <i386at/model_dep.h> -extern int timeopen(), timeclose(); -extern vm_offset_t timemmap(); #define timename "time" #ifndef MACH_HYP -extern int kdopen(), kdclose(), kdread(), kdwrite(); -extern int kdgetstat(), kdsetstat(), kdportdeath(); -extern vm_offset_t kdmmap(); +#include <i386at/kd.h> #define kdname "kd" #if NCOM > 0 -extern int comopen(), comclose(), comread(), comwrite(); -extern int comgetstat(), comsetstat(), comportdeath(); +#include <i386at/com.h> #define comname "com" #endif /* NCOM > 0 */ #if NLPR > 0 -extern int lpropen(), lprclose(), lprread(), lprwrite(); -extern int lprgetstat(), lprsetstat(), lprportdeath(); +#include <i386at/lpr.h> #define lprname "lpr" #endif /* NLPR > 0 */ #endif /* MACH_HYP */ -extern int kbdopen(), kbdclose(), kbdread(); -extern int kbdgetstat(), kbdsetstat(); +#include <i386at/kd_event.h> #define kbdname "kbd" #ifndef MACH_HYP -extern int mouseopen(), mouseclose(), mouseread(), mousegetstat(); +#include <i386at/kd_mouse.h> #define mousename "mouse" -extern vm_offset_t memmmap(); +#include <i386at/mem.h> #define memname "mem" #endif /* MACH_HYP */ -extern int kmsgopen(), kmsgclose(), kmsgread(), kmsggetstat(); +#include <device/kmsg.h> #define kmsgname "kmsg" #ifdef MACH_HYP -extern int hypcnopen(), hypcnclose(), hypcnread(), hypcnwrite(); -extern int hypcngetstat(), hypcnsetstat(), hypcnportdeath(); +#include <xen/console.h> #define hypcnname "hyp" #endif /* MACH_HYP */ diff --git a/i386/i386at/kd.h b/i386/i386at/kd.h index b29a5bf..c38f90b 100644 --- a/i386/i386at/kd.h +++ b/i386/i386at/kd.h @@ -76,6 +76,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include <sys/types.h> #include <sys/time.h> #include <device/cons.h> +#include <device/io_req.h> /* @@ -746,4 +747,24 @@ extern void kdintr(int vec); extern void kdb_kintr(void); #endif /* MACH_KDB */ +extern int kdopen(dev_t dev, int flag, io_req_t ior); +extern void kdclose(int dev, int flag); +extern int kdread(int dev, struct uio *uio); +extern int kdwrite(int dev, struct uio *uio); + +extern io_return_t kdgetstat( + dev_t dev, + int flavor, + int *data, + natural_t *count); + +extern io_return_t kdsetstat( + dev_t dev, + int flavor, + int * data, + natural_t count); + +extern int kdportdeath(dev_t dev, mach_port_t port); +extern int kdmmap(dev_t dev, off_t off, int prot); + #endif /* _KD_H_ */ diff --git a/i386/i386at/kd_event.h b/i386/i386at/kd_event.h index 677af99..ae18047 100644 --- a/i386/i386at/kd_event.h +++ b/i386/i386at/kd_event.h @@ -30,4 +30,20 @@ extern void X_kdb_enter (void); extern void X_kdb_exit (void); +extern int kbdopen(dev_t dev, int flags); +extern void kbdclose(dev_t dev, int flags); +extern int kbdread(dev_t dev, io_req_t ior); + +extern io_return_t kbdgetstat( + dev_t dev, + int flavor, + int *data, + unsigned int *count); + +extern io_return_t kbdsetstat( + dev_t dev, + int flavor, + int *data, + unsigned int count); + #endif /* _KD_EVENT_H_ */ diff --git a/i386/i386at/kd_mouse.h b/i386/i386at/kd_mouse.h index baa51c8..0f09418 100644 --- a/i386/i386at/kd_mouse.h +++ b/i386/i386at/kd_mouse.h @@ -54,4 +54,14 @@ extern void mouse_packet_mouse_system_mouse (u_char *mousebuf); extern void mouse_packet_ibm_ps2_mouse (u_char *mousebuf); +extern int mouseopen(dev_t dev, int flags); +extern void mouseclose(dev_t dev, int flags); +extern int mouseread(dev_t dev, io_req_t ior); + +extern io_return_t mousegetstat( + dev_t dev, + int flavor, + int *data, + unsigned int *count); + #endif /* _KD_MOUSE_H_ */ diff --git a/i386/i386at/lpr.h b/i386/i386at/lpr.h index ca7aeea..820d0ab 100644 --- a/i386/i386at/lpr.h +++ b/i386/i386at/lpr.h @@ -41,14 +41,14 @@ void lprstop(struct tty *tp, int flags); void lprstart(struct tty *tp); void lprattach(struct bus_device *dev); -io_return_t +extern io_return_t lprgetstat( dev_t dev, int flavor, int *data, natural_t *count); -io_return_t +extern io_return_t lprsetstat( dev_t dev, int flavor, @@ -57,4 +57,10 @@ lprsetstat( void lprpr_addr(unsigned short addr); +extern int lpropen(int dev, int flag, io_req_t ior); +extern void lprclose(int dev, int flag); +extern int lprread(int dev, io_req_t ior); +extern int lprwrite(int dev, io_req_t ior); +extern int lprportdeath(dev_t dev, mach_port_t port); + #endif /* _LPRREG_H_ */ diff --git a/i386/i386at/mem.h b/i386/i386at/mem.h new file mode 100644 index 0000000..3d6a96c --- /dev/null +++ b/i386/i386at/mem.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2013 Free Software Foundation. + * + * 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 of the License, 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, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef _MEM_H_ +#define _MEM_H_ + +extern int memmmap(int dev, vm_offset_t off, vm_prot_t prot); + +#endif /* _MEM_H_ */ diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c index 5606639..48ef329 100644 --- a/i386/i386at/model_dep.c +++ b/i386/i386at/model_dep.c @@ -620,9 +620,10 @@ void c_boot_entry(vm_offset_t bi) #include <mach/vm_prot.h> #include <vm/pmap.h> #include <mach/time_value.h> +#include <i386at/model_dep.h> int -timemmap(dev,off,prot) +timemmap(dev, off, prot) vm_prot_t prot; { extern time_value_t *mtime; diff --git a/i386/i386at/model_dep.h b/i386/i386at/model_dep.h new file mode 100644 index 0000000..3a5749f --- /dev/null +++ b/i386/i386at/model_dep.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2013 Free Software Foundation. + * + * 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 of the License, 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, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef _MODEL_DEP_H_ +#define _MODEL_DEP_H_ + +#include <mach/vm_prot.h> + +extern int timemmap(int dev, int off, vm_prot_t prot); + +#endif /* _MODEL_DEP_H_ */ |