summaryrefslogtreecommitdiffstats
path: root/c/src/exec/rtems/src/timerserverfireafter.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2002-03-29 15:32:18 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2002-03-29 15:32:18 +0000
commit894d01c2d401bbd472ddec9f025ca14b25ec4e5d (patch)
tree123e7ad38a5a22183c6e701452ed01833afa62e0 /c/src/exec/rtems/src/timerserverfireafter.c
parent5729f62e12673f322451fd4dcd6e790ec1e2ccef (diff)
downloadrtems-894d01c2d401bbd472ddec9f025ca14b25ec4e5d.tar.bz2
2001-03-29 Joel Sherrill <joel@OARcorp.com>
* 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.
Diffstat (limited to 'c/src/exec/rtems/src/timerserverfireafter.c')
-rw-r--r--c/src/exec/rtems/src/timerserverfireafter.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/c/src/exec/rtems/src/timerserverfireafter.c b/c/src/exec/rtems/src/timerserverfireafter.c
index 32b42b77ce..8c53449f1d 100644
--- a/c/src/exec/rtems/src/timerserverfireafter.c
+++ b/c/src/exec/rtems/src/timerserverfireafter.c
@@ -69,8 +69,12 @@ rtems_status_code rtems_timer_server_fire_after(
the_timer->the_class = TIMER_INTERVAL_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
+
+ _Timer_Server_stop_ticks_timer();
+ _Timer_Server_process_ticks_chain();
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
- _Timer_Server_reset( TIMER_SERVER_RESET_TICKS );
+ _Timer_Server_reset_ticks_timer();
+
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}