diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-04-15 11:26:46 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-05-19 12:00:42 +0200 |
commit | 290309014c15b4eceee9f77c90eb3c81cc223f4b (patch) | |
tree | 4b9ae28399c95783e9ac5847d6a7709f980d62ad /cpukit/score/include/rtems/score | |
parent | a61d38501ac25f81913f2766a64e43f8dfdba2b0 (diff) |
score: Add header to _Watchdog_Remove()
Add watchdog header parameter to _Watchdog_Remove() to be in line with
the other operations. Add _Watchdog_Remove_ticks() and
_Watchdog_Remove_seconds() for convenience.
Update #2307.
Diffstat (limited to 'cpukit/score/include/rtems/score')
-rw-r--r-- | cpukit/score/include/rtems/score/mrspimpl.h | 2 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/watchdogimpl.h | 18 |
2 files changed, 18 insertions, 2 deletions
diff --git a/cpukit/score/include/rtems/score/mrspimpl.h b/cpukit/score/include/rtems/score/mrspimpl.h index c40f41f716..07f78ce7e9 100644 --- a/cpukit/score/include/rtems/score/mrspimpl.h +++ b/cpukit/score/include/rtems/score/mrspimpl.h @@ -216,7 +216,7 @@ RTEMS_INLINE_ROUTINE MRSP_Status _MRSP_Wait_for_ownership( _Thread_Set_life_protection( initial_life_protection ); if ( timeout > 0 ) { - _Watchdog_Remove( &executing->Timer ); + _Watchdog_Remove_ticks( &executing->Timer ); } return status; diff --git a/cpukit/score/include/rtems/score/watchdogimpl.h b/cpukit/score/include/rtems/score/watchdogimpl.h index e548e7025c..ddd1ca4d1b 100644 --- a/cpukit/score/include/rtems/score/watchdogimpl.h +++ b/cpukit/score/include/rtems/score/watchdogimpl.h @@ -99,10 +99,12 @@ void _Watchdog_Handler_initialization( void ); * This routine removes @a the_watchdog from the watchdog chain on which * it resides and returns the state @a the_watchdog timer was in. * + * @param[in] header The watchdog chain. * @param[in] the_watchdog will be removed * @retval the state in which @a the_watchdog was in when removed */ Watchdog_States _Watchdog_Remove ( + Watchdog_Header *header, Watchdog_Control *the_watchdog ); @@ -306,6 +308,20 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Insert_seconds( } +RTEMS_INLINE_ROUTINE Watchdog_States _Watchdog_Remove_ticks( + Watchdog_Control *the_watchdog +) +{ + return _Watchdog_Remove( &_Watchdog_Ticks_header, the_watchdog ); +} + +RTEMS_INLINE_ROUTINE Watchdog_States _Watchdog_Remove_seconds( + Watchdog_Control *the_watchdog +) +{ + return _Watchdog_Remove( &_Watchdog_Seconds_header, the_watchdog ); +} + /** * This routine resets THE_WATCHDOG timer to its state at INSERT * time. This routine is valid only on interval watchdog timers @@ -318,7 +334,7 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Reset_ticks( ) { - (void) _Watchdog_Remove( the_watchdog ); + _Watchdog_Remove_ticks( the_watchdog ); _Watchdog_Insert( &_Watchdog_Ticks_header, the_watchdog ); |