diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2008-07-22 22:28:07 +0000 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gnu.org> | 2009-06-18 00:27:18 +0200 |
commit | 482cc1b78fae30281528145098ab8d9908d5fafe (patch) | |
tree | 4587121197bb788c514e2f833878cc0312d0241f /i386 | |
parent | 155f729a36531a464b82c63ae49adac5cc3b2d70 (diff) |
2008-07-19 Barry deFreese <bddebian@comcast.net>
* chips/busses.h (bus_ctlr, bus_device): Make intr return void instead
of int.
* device/tty.h (tty): Make t_start and t_stop return void instead of
int.
* i386/i386/ipl.h (ivect[]): return void instead of int.
* i386/i386at/pic_isa.h (ivect[]): Likewise.
* i386/i386at/kd_mouse.c (mouseintr): Likewise.
* i386/i386at/com.c (comintr, comstop): Likewise.
* i386/i386at/kd.c (kdcnputc, kdstart, kdstop, kdintr): Likewise.
* i386/i386/trap.c (exception, thread_exception_return, i386_exception):
Add __attribute__ ((noreturn)).
* i386/i386at/kd.c (kdcnprobe): Return 0 at end of function.
* i386/i386at/lpr.c (lprintr, lprstart): Return void instead of int.
(lprstart): Don't return numeric values any longer.
* kern/eventcount.c (evc_wait_clear): Return a value.
* kern/exceptions.c (exception, exception_try_task, exception_no_server,
exception_raise, exception_raise_continue, exception_raise_continue_slow,
exception_raise_continue_fast): Add __attribute__ ((noreturn)).
(exception, exceptio_try_task, exception_raise,
exception_raise_continue_slow, exception_raise_continue_fast):
Remove spurious returns.
(exception_no_server): Add panic() on return from thread_halt_self().
Diffstat (limited to 'i386')
-rw-r--r-- | i386/i386/ipl.h | 2 | ||||
-rw-r--r-- | i386/i386/trap.c | 6 | ||||
-rw-r--r-- | i386/i386at/com.c | 10 | ||||
-rw-r--r-- | i386/i386at/kd.c | 15 | ||||
-rw-r--r-- | i386/i386at/kd_mouse.c | 4 | ||||
-rw-r--r-- | i386/i386at/lpr.c | 15 | ||||
-rw-r--r-- | i386/i386at/pic_isa.c | 2 |
7 files changed, 28 insertions, 26 deletions
diff --git a/i386/i386/ipl.h b/i386/i386/ipl.h index 86ed660..557cd8d 100644 --- a/i386/i386/ipl.h +++ b/i386/i386/ipl.h @@ -70,7 +70,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifdef KERNEL #ifndef __ASSEMBLER__ #include <machine/machspl.h> -extern int (*ivect[])(); +extern void (*ivect[])(); extern int iunit[]; extern int intpri[]; #endif /* __ASSEMBLER__ */ diff --git a/i386/i386/trap.c b/i386/i386/trap.c index 9c96758..41ce0cc 100644 --- a/i386/i386/trap.c +++ b/i386/i386/trap.c @@ -60,10 +60,10 @@ #include "debug.h" -extern void exception(); -extern void thread_exception_return(); +extern void exception() __attribute__ ((noreturn)); +extern void thread_exception_return() __attribute__ ((noreturn)); -extern void i386_exception(); +extern void i386_exception() __attribute__ ((noreturn)); #if MACH_KDB boolean_t debug_all_traps_with_kdb = FALSE; diff --git a/i386/i386at/com.c b/i386/i386at/com.c index 6e7dcbf..a4cfbf8 100644 --- a/i386/i386at/com.c +++ b/i386/i386at/com.c @@ -47,10 +47,10 @@ extern void timeout(), ttrstrt(); -int comprobe(), comintr(), comstart(), commctl(); -void comattach(); +int comprobe(), comstart(), commctl(); +void comstop(), comattach(), comintr(); static void comparam(); -int comstop(), comgetstat(), comsetstat(); +int comgetstat(), comsetstat(); static vm_offset_t com_std[NCOM] = { 0 }; struct bus_device *cominfo[NCOM]; @@ -489,7 +489,7 @@ unsigned int count; return (D_SUCCESS); } -int +void comintr(unit) int unit; { @@ -809,7 +809,7 @@ commctl( return commodem[unit]; } -int +void comstop(tp, flags) register struct tty *tp; int flags; diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c index 6723752..8975ad1 100644 --- a/i386/i386at/kd.c +++ b/i386/i386at/kd.c @@ -118,7 +118,7 @@ boolean_t kdcheckmagic(); int kdcnprobe(struct consdev *cp); int kdcninit(struct consdev *cp); int kdcngetc(dev_t dev, int wait); -int kdcnputc(dev_t dev, int c); +void kdcnputc(dev_t dev, int c); int do_modifier (int, Scancode, boolean_t); /* @@ -461,9 +461,9 @@ kdopen(dev, flag, ior) io_req_t ior; { struct tty *tp; - int kdstart(); + void kdstart(); spl_t o_pri; - int kdstop(); + void kdstop(); tp = &kd_tty; o_pri = spltty(); @@ -737,7 +737,7 @@ int flags; /* flags set for console */ * */ /*ARGSUSED*/ -int +void kdintr(vec, regs) int vec; int regs; @@ -1085,7 +1085,7 @@ boolean_t extended; * Entered and left at spltty. Drops priority to spl0 to display character. * ASSUMES that it is never called from interrupt-driven code. */ -int +void kdstart(tp) struct tty *tp; { @@ -1136,7 +1136,7 @@ struct tty *tp; } /*ARGSUSED*/ -int +void kdstop(tp, flags) register struct tty *tp; int flags; @@ -2975,6 +2975,7 @@ kdcnprobe(struct consdev *cp) cp->cn_dev = makedev(maj, unit); cp->cn_pri = pri; + return 0; } int @@ -2997,7 +2998,7 @@ kdcngetc(dev_t dev, int wait) return kdcnmaygetc(); } -int +void kdcnputc(dev_t dev, int c) { if (!kd_initialized) diff --git a/i386/i386at/kd_mouse.c b/i386/i386at/kd_mouse.c index 9487c54..94ebd79 100644 --- a/i386/i386at/kd_mouse.c +++ b/i386/i386at/kd_mouse.c @@ -124,7 +124,7 @@ u_char lastbuttons; /* previous state of mouse buttons */ #define MOUSE_DOWN 0 #define MOUSE_ALL_UP 0x7 -int mouseintr(); +void mouseintr(); void mouse_enqueue(); int mouse_baud = BCNT1200; @@ -539,7 +539,7 @@ done: /* * mouseintr - Get a byte and pass it up for handling. Called at SPLKD. */ -int +void mouseintr(unit) { unsigned short base_addr = cominfo[unit]->address; diff --git a/i386/i386at/lpr.c b/i386/i386at/lpr.c index 05edc7b..ee8e721 100644 --- a/i386/i386at/lpr.c +++ b/i386/i386at/lpr.c @@ -65,7 +65,8 @@ extern void ttrstrt(); * Driver information for auto-configuration stuff. */ -int lprprobe(), lprintr(), lprstart(), lprstop(); +int lprprobe(), lprstop(); +void lprintr(), lprstart(); void lprattach(struct bus_device *); #ifdef MACH_KERNEL int lprstop(), lprgetstat(), lprsetstat(); @@ -280,7 +281,7 @@ int lprioctl(dev, cmd, addr, mode) } #endif /* MACH_KERNEL */ -int lprintr(unit) +void lprintr(unit) int unit; { register struct tty *tp = &lpr_tty[unit]; @@ -295,7 +296,7 @@ int unit; lprstart(tp); } -int lprstart(tp) +void lprstart(tp) struct tty *tp; { spl_t s = spltty(); @@ -305,13 +306,13 @@ struct tty *tp; if (tp->t_state & (TS_TIMEOUT|TS_TTSTOP|TS_BUSY)) { splx(s); - return(0); + return; } if (status & 0x20) { printf("Printer out of paper!\n"); splx(s); - return(0); + return; } if (tp->t_outq.c_cc <= TTLOWAT(tp)) { @@ -331,7 +332,7 @@ struct tty *tp; } if (tp->t_outq.c_cc == 0) { splx(s); - return(0); + return; } #ifdef MACH_KERNEL nch = getc(&tp->t_outq); @@ -366,7 +367,7 @@ struct tty *tp; } #endif /* MACH_KERNEL */ splx(s); - return(0); + return; } #ifdef MACH_KERNEL diff --git a/i386/i386at/pic_isa.c b/i386/i386at/pic_isa.c index 9d791c7..07b48a7 100644 --- a/i386/i386at/pic_isa.c +++ b/i386/i386at/pic_isa.c @@ -33,7 +33,7 @@ extern intnull(), fpintr(), hardclock(), kdintr(); extern prtnull(); -int (*ivect[NINTR])() = { +void (*ivect[NINTR])() = { /* 00 */ hardclock, /* always */ #if RCLINE < 0 /* 01 */ kdintr, /* kdintr, ... */ |