Corrected use of the state WATCHDOG_REINSERT and renamed it

WATCHDOG_BEING_INSERTED.
This commit is contained in:
Joel Sherrill
1995-12-01 19:27:40 +00:00
parent c4808ca59f
commit eedbfd94e0
5 changed files with 50 additions and 24 deletions

View File

@@ -67,8 +67,8 @@ typedef enum {
typedef enum {
WATCHDOG_INACTIVE, /* off all chains */
WATCHDOG_BEING_INSERTED, /* off all chains, searching for insertion point */
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_States;

View File

@@ -67,8 +67,8 @@ typedef enum {
typedef enum {
WATCHDOG_INACTIVE, /* off all chains */
WATCHDOG_BEING_INSERTED, /* off all chains, searching for insertion point */
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_States;

View File

@@ -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;
}

View File

@@ -67,8 +67,8 @@ typedef enum {
typedef enum {
WATCHDOG_INACTIVE, /* off all chains */
WATCHDOG_BEING_INSERTED, /* off all chains, searching for insertion point */
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_States;

View File

@@ -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;
}