From 894d01c2d401bbd472ddec9f025ca14b25ec4e5d Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 29 Mar 2002 15:32:18 +0000 Subject: 2001-03-29 Joel Sherrill * Per PR147 addressed problems when reseting and inserting a timer into a timer chain that did not honor time passage since the last time the timer server was scheduled and the new insertion. * include/rtems/rtems/timer.h, src/timerreset.c, src/timerserver.c, src/timerserverfireafter.c, src/timerserverfirewhen.c: Broke up the "reset server" routine into a set of very specific routines that allowed the server to be unscheduled, timer chains to be "synchronized" with the current time before inserting a new timer. --- c/src/exec/rtems/src/timerserverfirewhen.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'c/src/exec/rtems/src/timerserverfirewhen.c') diff --git a/c/src/exec/rtems/src/timerserverfirewhen.c b/c/src/exec/rtems/src/timerserverfirewhen.c index 6309315a75..4385d06cf8 100644 --- a/c/src/exec/rtems/src/timerserverfirewhen.c +++ b/c/src/exec/rtems/src/timerserverfirewhen.c @@ -77,8 +77,12 @@ rtems_status_code rtems_timer_server_fire_when( the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch; + + _Timer_Server_stop_seconds_timer(); + _Timer_Server_process_seconds_chain(); _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); - _Timer_Server_reset( TIMER_SERVER_RESET_SECONDS ); + _Timer_Server_reset_seconds_timer(); + _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } -- cgit v1.2.3