summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/watchdogimpl.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-04-15 11:26:46 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-05-19 12:00:42 +0200
commit290309014c15b4eceee9f77c90eb3c81cc223f4b (patch)
tree4b9ae28399c95783e9ac5847d6a7709f980d62ad /cpukit/score/include/rtems/score/watchdogimpl.h
parentscore: Optimize _Thread_queue_Compare_priority() (diff)
downloadrtems-290309014c15b4eceee9f77c90eb3c81cc223f4b.tar.bz2
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/watchdogimpl.h')
-rw-r--r--cpukit/score/include/rtems/score/watchdogimpl.h18
1 files changed, 17 insertions, 1 deletions
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 );