From 109ace3a1f0f6f26d974a1ed8e9595aa0eef0885 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 3 Dec 2008 20:58:29 +0000 Subject: 2008-12-03 Joel Sherrill PR 1347/cpukit * rtems/include/rtems/rtems/timer.h, rtems/src/rtemstimer.c, rtems/src/timerreset.c, rtems/src/timerserver.c, rtems/src/timerserverfireafter.c, rtems/src/timerserverfirewhen.c, score/Makefile.am, score/include/rtems/score/watchdog.h: Rework Timer Server to ensure that the context allows for blocking, allocating memory, and acquiring semaphores and mutexes. * score/src/watchdogadjusttochain.c: New file. --- cpukit/rtems/src/timerreset.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'cpukit/rtems/src/timerreset.c') diff --git a/cpukit/rtems/src/timerreset.c b/cpukit/rtems/src/timerreset.c index 7fea9fa7d5..1688051f8a 100644 --- a/cpukit/rtems/src/timerreset.c +++ b/cpukit/rtems/src/timerreset.c @@ -56,11 +56,12 @@ rtems_status_code rtems_timer_reset( _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); break; case TIMER_INTERVAL_ON_TASK: - _Timer_Server_stop_ticks_timer(); + if ( !_Timer_Server_schedule_operation ) { + _Thread_Enable_dispatch(); + return RTEMS_INCORRECT_STATE; + } _Watchdog_Remove( &the_timer->Ticker ); - _Timer_Server_process_ticks_chain(); - _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); - _Timer_Server_reset_ticks_timer(); + (*_Timer_Server_schedule_operation)( the_timer ); break; case TIMER_TIME_OF_DAY: case TIMER_TIME_OF_DAY_ON_TASK: -- cgit v1.2.3