summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1995-12-01 19:27:40 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1995-12-01 19:27:40 +0000
commiteedbfd94e0e37135041c8adf51cabc7e81aa4ea6 (patch)
tree691818b8013bdd9bafc538170850c83ba7344422 /cpukit
parenttypos fixed (diff)
downloadrtems-eedbfd94e0e37135041c8adf51cabc7e81aa4ea6.tar.bz2
Corrected use of the state WATCHDOG_REINSERT and renamed it
WATCHDOG_BEING_INSERTED.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/score/include/rtems/score/watchdog.h8
-rw-r--r--cpukit/score/src/watchdog.c25
2 files changed, 23 insertions, 10 deletions
diff --git a/cpukit/score/include/rtems/score/watchdog.h b/cpukit/score/include/rtems/score/watchdog.h
index 4fc2849343..de2f332e22 100644
--- a/cpukit/score/include/rtems/score/watchdog.h
+++ b/cpukit/score/include/rtems/score/watchdog.h
@@ -66,10 +66,10 @@ typedef enum {
*/
typedef enum {
- WATCHDOG_INACTIVE, /* off all chains */
- WATCHDOG_ACTIVE, /* on chain, allowed to fire */
- WATCHDOG_REINSERT, /* on chain, reset without firing if expires */
- WATCHDOG_REMOVE_IT /* on chain, remove without firing if expires */
+ WATCHDOG_INACTIVE, /* off all chains */
+ WATCHDOG_BEING_INSERTED, /* off all chains, searching for insertion point */
+ WATCHDOG_ACTIVE, /* on chain, allowed to fire */
+ WATCHDOG_REMOVE_IT /* on chain, remove without firing if expires */
} Watchdog_States;
/*
diff --git a/cpukit/score/src/watchdog.c b/cpukit/score/src/watchdog.c
index 9b2c165ee8..b7963f5408 100644
--- a/cpukit/score/src/watchdog.c
+++ b/cpukit/score/src/watchdog.c
@@ -58,7 +58,7 @@ Watchdog_States _Watchdog_Remove(
case WATCHDOG_INACTIVE:
break;
- case WATCHDOG_REINSERT:
+ case WATCHDOG_BEING_INSERTED:
/*
* It is not actually on the chain so just change the state and
@@ -151,7 +151,7 @@ void _Watchdog_Insert(
insert_isr_nest_level = _ISR_Nest_level;
- the_watchdog->state = WATCHDOG_REINSERT;
+ the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
restart:
@@ -184,7 +184,7 @@ restart:
_ISR_Flash( level );
- if ( the_watchdog->state != WATCHDOG_REINSERT ) {
+ if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
@@ -243,10 +243,23 @@ void _Watchdog_Tickle(
the_watchdog->user_data
);
break;
- case WATCHDOG_REINSERT:
- _Watchdog_Insert( header, the_watchdog, WATCHDOG_ACTIVATE_NOW );
- break;
+
case WATCHDOG_INACTIVE:
+ /*
+ * This state indicates that the watchdog is not on any chain.
+ * Thus, it is NOT on a chain being tickled. This case should
+ * never occur.
+ */
+ break;
+
+ case WATCHDOG_BEING_INSERTED:
+ /*
+ * This state indicates that the watchdog is in the process of
+ * BEING inserted on the chain. Thus, it can NOT be on a chain
+ * being tickled. This case should never occur.
+ */
+ break;
+
case WATCHDOG_REMOVE_IT:
break;
}