2009-07-23 Joel Sherrill <joel.sherrill@OARcorp.com>

* rtems/src/timerreset.c: Mark an unreachable path that is a sanity
	check as conditional on RTEMS_DEBUG.
This commit is contained in:
Joel Sherrill
2009-07-23 19:40:23 +00:00
parent 2c0d7929bc
commit f5b58ff34c
2 changed files with 17 additions and 4 deletions

View File

@@ -1,3 +1,8 @@
2009-07-23 Joel Sherrill <joel.sherrill@OARcorp.com>
* rtems/src/timerreset.c: Mark an unreachable path that is a sanity
check as conditional on RTEMS_DEBUG.
2009-07-23 Joel Sherrill <joel.sherrill@OARcorp.com>
* score/src/iterateoverthreads.c: Restructure a bit to make analysis

View File

@@ -56,10 +56,18 @@ rtems_status_code rtems_timer_reset(
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
break;
case TIMER_INTERVAL_ON_TASK:
if ( !_Timer_Server_schedule_operation ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
/*
* There is no way for a timer to have this class unless
* it was scheduled as a server fire. That requires that
* the Timer Server be initiated. So this error cannot
* occur unless something is internally wrong.
*/
#if defined(RTEMS_DEBUG)
if ( !_Timer_Server_schedule_operation ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
(*_Timer_Server_schedule_operation)( the_timer );
break;