Changeset 8d0b7d96 in rtems


Ignore:
Timestamp:
Dec 1, 1995, 10:03:55 PM (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
11ab74e
Parents:
caaa47c
Message:

Insert mode argument to _Watchdog_Insert removed. Now are watchdog timers
are automatically activated upon insertion.

Files:
27 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/posix/src/psignal.c

    rcaaa47c r8d0b7d96  
    253253      NULL
    254254    );
    255     _Watchdog_Insert_seconds(
    256       &_Thread_Executing->Timer,
    257       seconds,
    258       WATCHDOG_ACTIVATE_NOW
    259     );
     255    _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds );
    260256  _Thread_Enable_dispatch();
    261257  return 0;                       /* XXX should account for signal */
  • c/src/exec/rtems/src/event.c

    rcaaa47c r8d0b7d96  
    187187      NULL
    188188    );
    189     _Watchdog_Insert_ticks(
    190       &executing->Timer,
    191       ticks,
    192       WATCHDOG_ACTIVATE_NOW
    193     );
     189    _Watchdog_Insert_ticks( &executing->Timer, ticks );
    194190  }
    195191
  • c/src/exec/rtems/src/ratemon.c

    rcaaa47c r8d0b7d96  
    278278            NULL
    279279          );
    280           _Watchdog_Insert_ticks(
    281                      &the_period->Timer, length, WATCHDOG_ACTIVATE_NOW );
     280          _Watchdog_Insert_ticks( &the_period->Timer, length );
    282281          _Thread_Enable_dispatch();
    283282          return RTEMS_SUCCESSFUL;
     
    293292        case RATE_MONOTONIC_EXPIRED:
    294293          the_period->state = RATE_MONOTONIC_ACTIVE;
    295           _Watchdog_Insert_ticks(
    296                      &the_period->Timer, length, WATCHDOG_ACTIVATE_NOW );
     294          _Watchdog_Insert_ticks( &the_period->Timer, length );
    297295          _Thread_Enable_dispatch();
    298296          return RTEMS_TIMEOUT;
  • c/src/exec/rtems/src/rtemstimer.c

    rcaaa47c r8d0b7d96  
    243243      the_timer->the_class = TIMER_INTERVAL;
    244244      _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
    245       _Watchdog_Insert_ticks( &the_timer->Ticker,
    246                                  ticks, WATCHDOG_ACTIVATE_NOW );
     245      _Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
    247246      _Thread_Enable_dispatch();
    248247      return RTEMS_SUCCESSFUL;
     
    299298      the_timer->the_class = TIMER_TIME_OF_DAY;
    300299      _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
    301       _Watchdog_Insert_seconds( &the_timer->Ticker,
    302                 seconds - _TOD_Seconds_since_epoch, WATCHDOG_ACTIVATE_NOW );
     300      _Watchdog_Insert_seconds(
     301         &the_timer->Ticker,
     302         seconds - _TOD_Seconds_since_epoch
     303       );
    303304      _Thread_Enable_dispatch();
    304305      return RTEMS_SUCCESSFUL;
  • c/src/exec/rtems/src/tasks.c

    rcaaa47c r8d0b7d96  
    988988        NULL
    989989      );
    990       _Watchdog_Insert_ticks( &_Thread_Executing->Timer,
    991                               ticks, WATCHDOG_ACTIVATE_NOW );
     990      _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
    992991    _Thread_Enable_dispatch();
    993992  }
     
    10371036      NULL
    10381037    );
    1039     _Watchdog_Insert_seconds( &_Thread_Executing->Timer,
    1040             seconds - _TOD_Seconds_since_epoch, WATCHDOG_ACTIVATE_NOW );
     1038    _Watchdog_Insert_seconds(
     1039      &_Thread_Executing->Timer,
     1040      seconds - _TOD_Seconds_since_epoch
     1041    );
    10411042  _Thread_Enable_dispatch();
    10421043  return RTEMS_SUCCESSFUL;
  • c/src/exec/rtems/src/timer.c

    rcaaa47c r8d0b7d96  
    243243      the_timer->the_class = TIMER_INTERVAL;
    244244      _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
    245       _Watchdog_Insert_ticks( &the_timer->Ticker,
    246                                  ticks, WATCHDOG_ACTIVATE_NOW );
     245      _Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
    247246      _Thread_Enable_dispatch();
    248247      return RTEMS_SUCCESSFUL;
     
    299298      the_timer->the_class = TIMER_TIME_OF_DAY;
    300299      _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
    301       _Watchdog_Insert_seconds( &the_timer->Ticker,
    302                 seconds - _TOD_Seconds_since_epoch, WATCHDOG_ACTIVATE_NOW );
     300      _Watchdog_Insert_seconds(
     301         &the_timer->Ticker,
     302         seconds - _TOD_Seconds_since_epoch
     303       );
    303304      _Thread_Enable_dispatch();
    304305      return RTEMS_SUCCESSFUL;
  • c/src/exec/score/headers/watchdog.h

    rcaaa47c r8d0b7d96  
    4848
    4949#define WATCHDOG_NO_TIMEOUT  0
    50 
    51 /*
    52  *  The following enumerated type details the modes in which the
    53  *  Watchdog_Insert routine may operate.  The watchdog may be
    54  *  activated automatically at insert time or later, explicitly
    55  *  by the caller.
    56  */
    57 
    58 typedef enum {
    59   WATCHDOG_ACTIVATE_NOW, /* activate watchdog as part of insertion */
    60   WATCHDOG_NO_ACTIVATE   /* watchdog will be explicitly activated */
    61 } Watchdog_Insert_modes;
    6250
    6351/*
     
    239227STATIC INLINE void _Watchdog_Insert_ticks(
    240228  Watchdog_Control      *the_watchdog,
    241   Watchdog_Interval      units,
    242   Watchdog_Insert_modes  insert_mode
     229  Watchdog_Interval      units
    243230);
    244231
     
    257244STATIC INLINE void _Watchdog_Insert_seconds(
    258245  Watchdog_Control      *the_watchdog,
    259   Watchdog_Interval      units,
    260   Watchdog_Insert_modes  insert_mode
     246  Watchdog_Interval      units
    261247);
    262248
     
    392378void _Watchdog_Insert (
    393379  Chain_Control         *header,
    394   Watchdog_Control      *the_watchdog,
    395   Watchdog_Insert_modes  insert_mode
     380  Watchdog_Control      *the_watchdog
    396381);
    397382
  • c/src/exec/score/include/rtems/score/watchdog.h

    rcaaa47c r8d0b7d96  
    4848
    4949#define WATCHDOG_NO_TIMEOUT  0
    50 
    51 /*
    52  *  The following enumerated type details the modes in which the
    53  *  Watchdog_Insert routine may operate.  The watchdog may be
    54  *  activated automatically at insert time or later, explicitly
    55  *  by the caller.
    56  */
    57 
    58 typedef enum {
    59   WATCHDOG_ACTIVATE_NOW, /* activate watchdog as part of insertion */
    60   WATCHDOG_NO_ACTIVATE   /* watchdog will be explicitly activated */
    61 } Watchdog_Insert_modes;
    6250
    6351/*
     
    239227STATIC INLINE void _Watchdog_Insert_ticks(
    240228  Watchdog_Control      *the_watchdog,
    241   Watchdog_Interval      units,
    242   Watchdog_Insert_modes  insert_mode
     229  Watchdog_Interval      units
    243230);
    244231
     
    257244STATIC INLINE void _Watchdog_Insert_seconds(
    258245  Watchdog_Control      *the_watchdog,
    259   Watchdog_Interval      units,
    260   Watchdog_Insert_modes  insert_mode
     246  Watchdog_Interval      units
    261247);
    262248
     
    392378void _Watchdog_Insert (
    393379  Chain_Control         *header,
    394   Watchdog_Control      *the_watchdog,
    395   Watchdog_Insert_modes  insert_mode
     380  Watchdog_Control      *the_watchdog
    396381);
    397382
  • c/src/exec/score/inline/rtems/score/tod.inl

    rcaaa47c r8d0b7d96  
    6262)
    6363{
    64   _Watchdog_Insert_ticks(
    65     &_TOD_Seconds_watchdog,
    66     ticks,
    67     WATCHDOG_ACTIVATE_NOW
    68   );
     64  _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, ticks );
    6965}
    7066
  • c/src/exec/score/inline/rtems/score/watchdog.inl

    rcaaa47c r8d0b7d96  
    116116STATIC INLINE void _Watchdog_Insert_ticks(
    117117  Watchdog_Control      *the_watchdog,
    118   Watchdog_Interval      units,
    119   Watchdog_Insert_modes  insert_mode
     118  Watchdog_Interval      units
    120119)
    121120{
     
    123122  the_watchdog->initial = units;
    124123
    125   _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog, insert_mode );
     124  _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
    126125
    127126}
     
    135134STATIC INLINE void _Watchdog_Insert_seconds(
    136135  Watchdog_Control      *the_watchdog,
    137   Watchdog_Interval      units,
    138   Watchdog_Insert_modes  insert_mode
     136  Watchdog_Interval      units
    139137)
    140138{
     
    142140  the_watchdog->initial = units;
    143141
    144   _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog, insert_mode );
     142  _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
    145143
    146144}
     
    191189  (void) _Watchdog_Remove( the_watchdog );
    192190
    193   _Watchdog_Insert(
    194     &_Watchdog_Ticks_chain,
    195     the_watchdog,
    196     WATCHDOG_ACTIVATE_NOW
    197   );
     191  _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
    198192
    199193}
  • c/src/exec/score/inline/tod.inl

    rcaaa47c r8d0b7d96  
    6262)
    6363{
    64   _Watchdog_Insert_ticks(
    65     &_TOD_Seconds_watchdog,
    66     ticks,
    67     WATCHDOG_ACTIVATE_NOW
    68   );
     64  _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, ticks );
    6965}
    7066
  • c/src/exec/score/inline/watchdog.inl

    rcaaa47c r8d0b7d96  
    116116STATIC INLINE void _Watchdog_Insert_ticks(
    117117  Watchdog_Control      *the_watchdog,
    118   Watchdog_Interval      units,
    119   Watchdog_Insert_modes  insert_mode
     118  Watchdog_Interval      units
    120119)
    121120{
     
    123122  the_watchdog->initial = units;
    124123
    125   _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog, insert_mode );
     124  _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
    126125
    127126}
     
    135134STATIC INLINE void _Watchdog_Insert_seconds(
    136135  Watchdog_Control      *the_watchdog,
    137   Watchdog_Interval      units,
    138   Watchdog_Insert_modes  insert_mode
     136  Watchdog_Interval      units
    139137)
    140138{
     
    142140  the_watchdog->initial = units;
    143141
    144   _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog, insert_mode );
     142  _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
    145143
    146144}
     
    191189  (void) _Watchdog_Remove( the_watchdog );
    192190
    193   _Watchdog_Insert(
    194     &_Watchdog_Ticks_chain,
    195     the_watchdog,
    196     WATCHDOG_ACTIVATE_NOW
    197   );
     191  _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
    198192
    199193}
  • c/src/exec/score/src/coretod.c

    rcaaa47c r8d0b7d96  
    232232
    233233  _Watchdog_Tickle_seconds();
    234   _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, _TOD_Ticks_per_second,
    235                           WATCHDOG_ACTIVATE_NOW );
    236 }
     234  _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, _TOD_Ticks_per_second );
     235}
  • c/src/exec/score/src/threadq.c

    rcaaa47c r8d0b7d96  
    110110    );
    111111
    112     _Watchdog_Insert_ticks(
    113        &the_thread->Timer,
    114       timeout,
    115       WATCHDOG_ACTIVATE_NOW
    116     );
     112    _Watchdog_Insert_ticks( &the_thread->Timer, timeout );
    117113  }
    118114
  • c/src/exec/score/src/tod.c

    rcaaa47c r8d0b7d96  
    232232
    233233  _Watchdog_Tickle_seconds();
    234   _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, _TOD_Ticks_per_second,
    235                           WATCHDOG_ACTIVATE_NOW );
    236 }
     234  _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, _TOD_Ticks_per_second );
     235}
  • c/src/exec/score/src/watchdog.c

    rcaaa47c r8d0b7d96  
    141141void _Watchdog_Insert(
    142142  Chain_Control         *header,
    143   Watchdog_Control      *the_watchdog,
    144   Watchdog_Insert_modes  insert_mode
     143  Watchdog_Control      *the_watchdog
    145144)
    146145{
     
    175174
    176175     /*
    177       *  If you experience problems comment out the _ISR_Flash line.  This
    178       *  (3.2.0) is the first release with this critical section redesigned.
     176      *  If you experience problems comment out the _ISR_Flash line. 
     177      *  3.2.0 was the first release with this critical section redesigned.
    179178      *  Under certain circumstances, the PREVIOUS critical section algorithm
    180       *  used around this flash point allows interrupts to execute
     179      *  used around this flash point allowed interrupts to execute
    181180      *  which violated the design assumptions.  The critical section
    182181      *  mechanism used here WAS redesigned to address this.
     
    196195  }
    197196
    198   if ( insert_mode == WATCHDOG_ACTIVATE_NOW )
    199     _Watchdog_Activate( the_watchdog );
     197  _Watchdog_Activate( the_watchdog );
    200198
    201199  the_watchdog->delta_interval = delta_interval;
  • cpukit/posix/src/psignal.c

    rcaaa47c r8d0b7d96  
    253253      NULL
    254254    );
    255     _Watchdog_Insert_seconds(
    256       &_Thread_Executing->Timer,
    257       seconds,
    258       WATCHDOG_ACTIVATE_NOW
    259     );
     255    _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds );
    260256  _Thread_Enable_dispatch();
    261257  return 0;                       /* XXX should account for signal */
  • cpukit/rtems/src/event.c

    rcaaa47c r8d0b7d96  
    187187      NULL
    188188    );
    189     _Watchdog_Insert_ticks(
    190       &executing->Timer,
    191       ticks,
    192       WATCHDOG_ACTIVATE_NOW
    193     );
     189    _Watchdog_Insert_ticks( &executing->Timer, ticks );
    194190  }
    195191
  • cpukit/rtems/src/ratemon.c

    rcaaa47c r8d0b7d96  
    278278            NULL
    279279          );
    280           _Watchdog_Insert_ticks(
    281                      &the_period->Timer, length, WATCHDOG_ACTIVATE_NOW );
     280          _Watchdog_Insert_ticks( &the_period->Timer, length );
    282281          _Thread_Enable_dispatch();
    283282          return RTEMS_SUCCESSFUL;
     
    293292        case RATE_MONOTONIC_EXPIRED:
    294293          the_period->state = RATE_MONOTONIC_ACTIVE;
    295           _Watchdog_Insert_ticks(
    296                      &the_period->Timer, length, WATCHDOG_ACTIVATE_NOW );
     294          _Watchdog_Insert_ticks( &the_period->Timer, length );
    297295          _Thread_Enable_dispatch();
    298296          return RTEMS_TIMEOUT;
  • cpukit/rtems/src/rtemstimer.c

    rcaaa47c r8d0b7d96  
    243243      the_timer->the_class = TIMER_INTERVAL;
    244244      _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
    245       _Watchdog_Insert_ticks( &the_timer->Ticker,
    246                                  ticks, WATCHDOG_ACTIVATE_NOW );
     245      _Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
    247246      _Thread_Enable_dispatch();
    248247      return RTEMS_SUCCESSFUL;
     
    299298      the_timer->the_class = TIMER_TIME_OF_DAY;
    300299      _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
    301       _Watchdog_Insert_seconds( &the_timer->Ticker,
    302                 seconds - _TOD_Seconds_since_epoch, WATCHDOG_ACTIVATE_NOW );
     300      _Watchdog_Insert_seconds(
     301         &the_timer->Ticker,
     302         seconds - _TOD_Seconds_since_epoch
     303       );
    303304      _Thread_Enable_dispatch();
    304305      return RTEMS_SUCCESSFUL;
  • cpukit/rtems/src/tasks.c

    rcaaa47c r8d0b7d96  
    988988        NULL
    989989      );
    990       _Watchdog_Insert_ticks( &_Thread_Executing->Timer,
    991                               ticks, WATCHDOG_ACTIVATE_NOW );
     990      _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
    992991    _Thread_Enable_dispatch();
    993992  }
     
    10371036      NULL
    10381037    );
    1039     _Watchdog_Insert_seconds( &_Thread_Executing->Timer,
    1040             seconds - _TOD_Seconds_since_epoch, WATCHDOG_ACTIVATE_NOW );
     1038    _Watchdog_Insert_seconds(
     1039      &_Thread_Executing->Timer,
     1040      seconds - _TOD_Seconds_since_epoch
     1041    );
    10411042  _Thread_Enable_dispatch();
    10421043  return RTEMS_SUCCESSFUL;
  • cpukit/score/include/rtems/score/watchdog.h

    rcaaa47c r8d0b7d96  
    4848
    4949#define WATCHDOG_NO_TIMEOUT  0
    50 
    51 /*
    52  *  The following enumerated type details the modes in which the
    53  *  Watchdog_Insert routine may operate.  The watchdog may be
    54  *  activated automatically at insert time or later, explicitly
    55  *  by the caller.
    56  */
    57 
    58 typedef enum {
    59   WATCHDOG_ACTIVATE_NOW, /* activate watchdog as part of insertion */
    60   WATCHDOG_NO_ACTIVATE   /* watchdog will be explicitly activated */
    61 } Watchdog_Insert_modes;
    6250
    6351/*
     
    239227STATIC INLINE void _Watchdog_Insert_ticks(
    240228  Watchdog_Control      *the_watchdog,
    241   Watchdog_Interval      units,
    242   Watchdog_Insert_modes  insert_mode
     229  Watchdog_Interval      units
    243230);
    244231
     
    257244STATIC INLINE void _Watchdog_Insert_seconds(
    258245  Watchdog_Control      *the_watchdog,
    259   Watchdog_Interval      units,
    260   Watchdog_Insert_modes  insert_mode
     246  Watchdog_Interval      units
    261247);
    262248
     
    392378void _Watchdog_Insert (
    393379  Chain_Control         *header,
    394   Watchdog_Control      *the_watchdog,
    395   Watchdog_Insert_modes  insert_mode
     380  Watchdog_Control      *the_watchdog
    396381);
    397382
  • cpukit/score/inline/rtems/score/tod.inl

    rcaaa47c r8d0b7d96  
    6262)
    6363{
    64   _Watchdog_Insert_ticks(
    65     &_TOD_Seconds_watchdog,
    66     ticks,
    67     WATCHDOG_ACTIVATE_NOW
    68   );
     64  _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, ticks );
    6965}
    7066
  • cpukit/score/inline/rtems/score/watchdog.inl

    rcaaa47c r8d0b7d96  
    116116STATIC INLINE void _Watchdog_Insert_ticks(
    117117  Watchdog_Control      *the_watchdog,
    118   Watchdog_Interval      units,
    119   Watchdog_Insert_modes  insert_mode
     118  Watchdog_Interval      units
    120119)
    121120{
     
    123122  the_watchdog->initial = units;
    124123
    125   _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog, insert_mode );
     124  _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
    126125
    127126}
     
    135134STATIC INLINE void _Watchdog_Insert_seconds(
    136135  Watchdog_Control      *the_watchdog,
    137   Watchdog_Interval      units,
    138   Watchdog_Insert_modes  insert_mode
     136  Watchdog_Interval      units
    139137)
    140138{
     
    142140  the_watchdog->initial = units;
    143141
    144   _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog, insert_mode );
     142  _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
    145143
    146144}
     
    191189  (void) _Watchdog_Remove( the_watchdog );
    192190
    193   _Watchdog_Insert(
    194     &_Watchdog_Ticks_chain,
    195     the_watchdog,
    196     WATCHDOG_ACTIVATE_NOW
    197   );
     191  _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
    198192
    199193}
  • cpukit/score/src/coretod.c

    rcaaa47c r8d0b7d96  
    232232
    233233  _Watchdog_Tickle_seconds();
    234   _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, _TOD_Ticks_per_second,
    235                           WATCHDOG_ACTIVATE_NOW );
    236 }
     234  _Watchdog_Insert_ticks( &_TOD_Seconds_watchdog, _TOD_Ticks_per_second );
     235}
  • cpukit/score/src/threadq.c

    rcaaa47c r8d0b7d96  
    110110    );
    111111
    112     _Watchdog_Insert_ticks(
    113        &the_thread->Timer,
    114       timeout,
    115       WATCHDOG_ACTIVATE_NOW
    116     );
     112    _Watchdog_Insert_ticks( &the_thread->Timer, timeout );
    117113  }
    118114
  • cpukit/score/src/watchdog.c

    rcaaa47c r8d0b7d96  
    141141void _Watchdog_Insert(
    142142  Chain_Control         *header,
    143   Watchdog_Control      *the_watchdog,
    144   Watchdog_Insert_modes  insert_mode
     143  Watchdog_Control      *the_watchdog
    145144)
    146145{
     
    175174
    176175     /*
    177       *  If you experience problems comment out the _ISR_Flash line.  This
    178       *  (3.2.0) is the first release with this critical section redesigned.
     176      *  If you experience problems comment out the _ISR_Flash line. 
     177      *  3.2.0 was the first release with this critical section redesigned.
    179178      *  Under certain circumstances, the PREVIOUS critical section algorithm
    180       *  used around this flash point allows interrupts to execute
     179      *  used around this flash point allowed interrupts to execute
    181180      *  which violated the design assumptions.  The critical section
    182181      *  mechanism used here WAS redesigned to address this.
     
    196195  }
    197196
    198   if ( insert_mode == WATCHDOG_ACTIVATE_NOW )
    199     _Watchdog_Activate( the_watchdog );
     197  _Watchdog_Activate( the_watchdog );
    200198
    201199  the_watchdog->delta_interval = delta_interval;
Note: See TracChangeset for help on using the changeset viewer.