diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-07-23 19:40:23 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-07-23 19:40:23 +0000 |
commit | f5b58ff34caf5aa5c68e57951271e8771d7cf49e (patch) | |
tree | ac5fa051b812f8296fe90e9f0ade89793dbcd348 /cpukit/rtems/src/timerreset.c | |
parent | 2009-07-23 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-f5b58ff34caf5aa5c68e57951271e8771d7cf49e.tar.bz2 |
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.
Diffstat (limited to 'cpukit/rtems/src/timerreset.c')
-rw-r--r-- | cpukit/rtems/src/timerreset.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/cpukit/rtems/src/timerreset.c b/cpukit/rtems/src/timerreset.c index 1688051f8a..913c10f569 100644 --- a/cpukit/rtems/src/timerreset.c +++ b/cpukit/rtems/src/timerreset.c @@ -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; |