diff options
Diffstat (limited to 'cpukit/score/src/watchdogadjusttochain.c')
-rw-r--r-- | cpukit/score/src/watchdogadjusttochain.c | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/cpukit/score/src/watchdogadjusttochain.c b/cpukit/score/src/watchdogadjusttochain.c deleted file mode 100644 index 1926656ca3..0000000000 --- a/cpukit/score/src/watchdogadjusttochain.c +++ /dev/null @@ -1,75 +0,0 @@ -/** - * @file - * - * @brief Watchdog Adjust to Chain - * @ingroup ScoreWatchdog - */ - -/* - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <rtems/score/watchdogimpl.h> -#include <rtems/score/isrlevel.h> - -void _Watchdog_Adjust_to_chain( - Watchdog_Header *header, - Watchdog_Interval units_arg, - Chain_Control *to_fire - -) -{ - Watchdog_Interval units = units_arg; - ISR_Level level; - Watchdog_Control *first; - - _ISR_Disable( level ); - - while ( 1 ) { - if ( _Watchdog_Is_empty( header ) ) { - break; - } - first = _Watchdog_First( header ); - - /* - * If it is longer than "units" until the first element on the chain - * fires, then bump it and quit. - */ - if ( units < first->delta_interval ) { - first->delta_interval -= units; - break; - } - - /* - * The first set happens in less than units, so take all of them - * off the chain and adjust units to reflect this. - */ - units -= first->delta_interval; - first->delta_interval = 0; - - while ( 1 ) { - _Chain_Extract_unprotected( &first->Node ); - _Chain_Append_unprotected( to_fire, &first->Node ); - - _ISR_Flash( level ); - - if ( _Watchdog_Is_empty( header ) ) - break; - first = _Watchdog_First( header ); - if ( first->delta_interval != 0 ) - break; - } - } - - _ISR_Enable( level ); -} - |