source: rtems/cpukit/score/src/watchdogremove.c @ 2d7ae960

4.115
Last change on this file since 2d7ae960 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 1.6 KB
Line 
1/*
2 *  Watchdog Handler
3 *
4 *
5 *  COPYRIGHT (c) 1989-1999.
6 *  On-Line Applications Research Corporation (OAR).
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.rtems.com/license/LICENSE.
11 */
12
13#if HAVE_CONFIG_H
14#include "config.h"
15#endif
16
17#include <rtems/system.h>
18#include <rtems/score/isr.h>
19#include <rtems/score/watchdog.h>
20
21/*
22 *  _Watchdog_Remove
23 *
24 *  The routine removes a watchdog from a delta chain and updates
25 *  the delta counters of the remaining watchdogs.
26 */
27
28Watchdog_States _Watchdog_Remove(
29  Watchdog_Control *the_watchdog
30)
31{
32  ISR_Level         level;
33  Watchdog_States   previous_state;
34  Watchdog_Control *next_watchdog;
35
36  _ISR_Disable( level );
37  previous_state = the_watchdog->state;
38  switch ( previous_state ) {
39    case WATCHDOG_INACTIVE:
40      break;
41
42    case WATCHDOG_BEING_INSERTED:
43
44      /*
45       *  It is not actually on the chain so just change the state and
46       *  the Insert operation we interrupted will be aborted.
47       */
48      the_watchdog->state = WATCHDOG_INACTIVE;
49      break;
50
51    case WATCHDOG_ACTIVE:
52    case WATCHDOG_REMOVE_IT:
53
54      the_watchdog->state = WATCHDOG_INACTIVE;
55      next_watchdog = _Watchdog_Next( the_watchdog );
56
57      if ( _Watchdog_Next(next_watchdog) )
58        next_watchdog->delta_interval += the_watchdog->delta_interval;
59
60      if ( _Watchdog_Sync_count )
61        _Watchdog_Sync_level = _ISR_Nest_level;
62
63      _Chain_Extract_unprotected( &the_watchdog->Node );
64      break;
65  }
66  the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
67
68  _ISR_Enable( level );
69  return( previous_state );
70}
Note: See TracBrowser for help on using the repository browser.