From e0a627a303df094331381a6efaa5784a5d4c97f5 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 30 Aug 2011 03:09:29 +0200 Subject: Cast function timeout() argument to fix a warning * kern/mach_clock.h (timer_func_t): New function type. (struct timer_elt): Change fcn type to timer_func_t. * i386/i386at/com.c (comstart): Cast `ttrstrt' to `timer_funct_t *' in `timeout' call. * i386/i386at/lpr.c (lprstart): Likewise, --- kern/mach_clock.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'kern/mach_clock.h') diff --git a/kern/mach_clock.h b/kern/mach_clock.h index 2009c709..4e4e8ff1 100644 --- a/kern/mach_clock.h +++ b/kern/mach_clock.h @@ -37,10 +37,12 @@ extern int hz; /* number of ticks per second */ extern int tick; /* number of usec per tick */ +typedef void timer_func_t(void *); + /* Time-out element. */ struct timer_elt { queue_chain_t chain; /* chain in order of expiration */ - void (*fcn)(); /* function to call */ + timer_func_t *fcn; /* function to call */ void * param; /* with this parameter */ unsigned long ticks; /* expiration time, in ticks */ int set; /* unset | set | allocated */ @@ -99,7 +101,7 @@ extern kern_return_t host_adjust_time( extern void mapable_time_init (void); /* For public timer elements. */ -extern void timeout(void (*fcn)(void *), void *param, int interval); -extern boolean_t untimeout(void (*fcn)(void *), void *param); +extern void timeout(timer_func_t *fcn, void *param, int interval); +extern boolean_t untimeout(timer_func_t *fcn, void *param); #endif /* _KERN_MACH_CLOCK_H_ */ -- cgit v1.2.3