forked from Imagelibrary/rtems
Corrected use of the state WATCHDOG_REINSERT and renamed it
WATCHDOG_BEING_INSERTED.
This commit is contained in:
@@ -67,8 +67,8 @@ typedef enum {
|
|||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
WATCHDOG_INACTIVE, /* off all chains */
|
WATCHDOG_INACTIVE, /* off all chains */
|
||||||
|
WATCHDOG_BEING_INSERTED, /* off all chains, searching for insertion point */
|
||||||
WATCHDOG_ACTIVE, /* on chain, allowed to fire */
|
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_REMOVE_IT /* on chain, remove without firing if expires */
|
||||||
} Watchdog_States;
|
} Watchdog_States;
|
||||||
|
|
||||||
|
|||||||
@@ -67,8 +67,8 @@ typedef enum {
|
|||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
WATCHDOG_INACTIVE, /* off all chains */
|
WATCHDOG_INACTIVE, /* off all chains */
|
||||||
|
WATCHDOG_BEING_INSERTED, /* off all chains, searching for insertion point */
|
||||||
WATCHDOG_ACTIVE, /* on chain, allowed to fire */
|
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_REMOVE_IT /* on chain, remove without firing if expires */
|
||||||
} Watchdog_States;
|
} Watchdog_States;
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ Watchdog_States _Watchdog_Remove(
|
|||||||
case WATCHDOG_INACTIVE:
|
case WATCHDOG_INACTIVE:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WATCHDOG_REINSERT:
|
case WATCHDOG_BEING_INSERTED:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* It is not actually on the chain so just change the state and
|
* 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;
|
insert_isr_nest_level = _ISR_Nest_level;
|
||||||
the_watchdog->state = WATCHDOG_REINSERT;
|
the_watchdog->state = WATCHDOG_BEING_INSERTED;
|
||||||
|
|
||||||
_Watchdog_Sync_count++;
|
_Watchdog_Sync_count++;
|
||||||
restart:
|
restart:
|
||||||
@@ -184,7 +184,7 @@ restart:
|
|||||||
|
|
||||||
_ISR_Flash( level );
|
_ISR_Flash( level );
|
||||||
|
|
||||||
if ( the_watchdog->state != WATCHDOG_REINSERT ) {
|
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
|
||||||
goto exit_insert;
|
goto exit_insert;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -243,10 +243,23 @@ void _Watchdog_Tickle(
|
|||||||
the_watchdog->user_data
|
the_watchdog->user_data
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case WATCHDOG_REINSERT:
|
|
||||||
_Watchdog_Insert( header, the_watchdog, WATCHDOG_ACTIVATE_NOW );
|
|
||||||
break;
|
|
||||||
case WATCHDOG_INACTIVE:
|
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:
|
case WATCHDOG_REMOVE_IT:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,8 +67,8 @@ typedef enum {
|
|||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
WATCHDOG_INACTIVE, /* off all chains */
|
WATCHDOG_INACTIVE, /* off all chains */
|
||||||
|
WATCHDOG_BEING_INSERTED, /* off all chains, searching for insertion point */
|
||||||
WATCHDOG_ACTIVE, /* on chain, allowed to fire */
|
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_REMOVE_IT /* on chain, remove without firing if expires */
|
||||||
} Watchdog_States;
|
} Watchdog_States;
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ Watchdog_States _Watchdog_Remove(
|
|||||||
case WATCHDOG_INACTIVE:
|
case WATCHDOG_INACTIVE:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WATCHDOG_REINSERT:
|
case WATCHDOG_BEING_INSERTED:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* It is not actually on the chain so just change the state and
|
* 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;
|
insert_isr_nest_level = _ISR_Nest_level;
|
||||||
the_watchdog->state = WATCHDOG_REINSERT;
|
the_watchdog->state = WATCHDOG_BEING_INSERTED;
|
||||||
|
|
||||||
_Watchdog_Sync_count++;
|
_Watchdog_Sync_count++;
|
||||||
restart:
|
restart:
|
||||||
@@ -184,7 +184,7 @@ restart:
|
|||||||
|
|
||||||
_ISR_Flash( level );
|
_ISR_Flash( level );
|
||||||
|
|
||||||
if ( the_watchdog->state != WATCHDOG_REINSERT ) {
|
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
|
||||||
goto exit_insert;
|
goto exit_insert;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -243,10 +243,23 @@ void _Watchdog_Tickle(
|
|||||||
the_watchdog->user_data
|
the_watchdog->user_data
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case WATCHDOG_REINSERT:
|
|
||||||
_Watchdog_Insert( header, the_watchdog, WATCHDOG_ACTIVATE_NOW );
|
|
||||||
break;
|
|
||||||
case WATCHDOG_INACTIVE:
|
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:
|
case WATCHDOG_REMOVE_IT:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user