diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2009-10-20 21:46:20 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2009-10-20 21:57:40 +0200 |
commit | ea2b5b8f72c56bde682593e783552eb13b7412ad (patch) | |
tree | 587ff9c60c12bf3fec26de39fb018afbd1d498fb /kern/sched_prim.c | |
parent | a6f1c3969da8040f1f7306308d0154858276cc51 (diff) | |
download | gnumach-ea2b5b8f72c56bde682593e783552eb13b7412ad.tar.gz gnumach-ea2b5b8f72c56bde682593e783552eb13b7412ad.tar.bz2 gnumach-ea2b5b8f72c56bde682593e783552eb13b7412ad.zip |
Fix warnings
* device/chario.c (ttypush): Set parameter type to void * instead of
struct tty *, and implicitly cast the former into the latter instead.
* i386/i386at/com.c: Include <kern/mach_clock.h>.
(timeout, ttrstrt): Remove declarations.
(comtimer): Add unused void * parameter.
(comopen): Pass NULL to comtimer function.
* i386/i386at/kd.h (kd_belloff): Add unused void * parameter.
* i386/i386at/kd.c (timeout): Remove declaration.
(kd_belloff): Add unused void * parameter.
(feep, kdsetbell): Pass NULL to kd_belloff function.
* i386/i386at/lpr.c: Include <mach_clock.h>.
(timeout, ttrstrt): Remove declarations.
* kern/mach_clock.c (softclock, timeout, untimeout): Set parameter
type of fcn function pointer to void * instead of char *. Set type
of param to void * instead of char *.
* kern/mach_clock.h (timer_elt): Set parameter type of fcn member
to void * instead of char *. Set time of param member to void * instead
of char *.
(timeout): Set parameter type of fcn function pointer parameter to void
* instead of char *.
(untimeout): Likewise, set type of param parameter to void * instead of
char *.
* kern/sched_prim.c (sched_init): Remove cast of recompute_priorities.
Replace (char *)0 with NULL.
(thread_timeout): Set parameter type to void * instead of thread_t, and
implicitly cast the former into the latter instead.
(thread_timeout_setup): Remove cast of thread_timeout, cast
thread_depress_timeout into (void (*) (void*)). Remove cast of thread.
(thread_recompute_priorities): Add unused void * parameter.
Diffstat (limited to 'kern/sched_prim.c')
-rw-r--r-- | kern/sched_prim.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/kern/sched_prim.c b/kern/sched_prim.c index a3bcbf82..ff942aee 100644 --- a/kern/sched_prim.c +++ b/kern/sched_prim.c @@ -160,8 +160,8 @@ void wait_queue_init(void) void sched_init(void) { - recompute_priorities_timer.fcn = (int (*)())recompute_priorities; - recompute_priorities_timer.param = (char *)0; + recompute_priorities_timer.fcn = recompute_priorities; + recompute_priorities_timer.param = NULL; min_quantum = hz / 10; /* context switch 10 times/second */ wait_queue_init(); @@ -180,8 +180,9 @@ void sched_init(void) * Called at splsoftclock. */ void thread_timeout( - thread_t thread) + void *_thread) { + thread_t thread = _thread; assert(thread->timer.set == TELT_UNSET); clear_wait(thread, THREAD_TIMED_OUT, FALSE); @@ -216,10 +217,10 @@ void thread_set_timeout( void thread_timeout_setup( register thread_t thread) { - thread->timer.fcn = (int (*)())thread_timeout; - thread->timer.param = (char *)thread; - thread->depress_timer.fcn = (int (*)())thread_depress_timeout; - thread->depress_timer.param = (char *)thread; + thread->timer.fcn = thread_timeout; + thread->timer.param = thread; + thread->depress_timer.fcn = (void (*)(void*))thread_depress_timeout; + thread->depress_timer.param = thread; } /* @@ -1094,7 +1095,7 @@ void compute_my_priority( * * Update the priorities of all threads periodically. */ -void recompute_priorities(void) +void recompute_priorities(void *param) { #if SIMPLE_CLOCK int new_usec; |