forked from Imagelibrary/rtems
score: Delete unused state WATCHDOG_REMOVE_IT
This commit is contained in:
@@ -74,7 +74,7 @@ unsigned int alarm(
|
|||||||
_Thread_Disable_dispatch();
|
_Thread_Disable_dispatch();
|
||||||
|
|
||||||
state = _Watchdog_Remove_seconds( the_timer );
|
state = _Watchdog_Remove_seconds( the_timer );
|
||||||
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
|
if ( state == WATCHDOG_ACTIVE ) {
|
||||||
/*
|
/*
|
||||||
* The stop_time and start_time fields are snapshots of ticks since
|
* The stop_time and start_time fields are snapshots of ticks since
|
||||||
* boot. Since alarm() is dealing in seconds, we must account for
|
* boot. Since alarm() is dealing in seconds, we must account for
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ useconds_t ualarm(
|
|||||||
_Thread_Disable_dispatch();
|
_Thread_Disable_dispatch();
|
||||||
|
|
||||||
state = _Watchdog_Remove_ticks( the_timer );
|
state = _Watchdog_Remove_ticks( the_timer );
|
||||||
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
|
if ( state == WATCHDOG_ACTIVE ) {
|
||||||
/*
|
/*
|
||||||
* The stop_time and start_time fields are snapshots of ticks since
|
* The stop_time and start_time fields are snapshots of ticks since
|
||||||
* boot. Since alarm() is dealing in seconds, we must account for
|
* boot. Since alarm() is dealing in seconds, we must account for
|
||||||
|
|||||||
@@ -86,11 +86,7 @@ typedef enum {
|
|||||||
*/
|
*/
|
||||||
WATCHDOG_BEING_INSERTED,
|
WATCHDOG_BEING_INSERTED,
|
||||||
/** This is the state when the watchdog is on a chain, and allowed to fire. */
|
/** This is the state when the watchdog is on a chain, and allowed to fire. */
|
||||||
WATCHDOG_ACTIVE,
|
WATCHDOG_ACTIVE
|
||||||
/** This is the state when the watchdog is on a chain, but we should
|
|
||||||
* remove without firing if it expires.
|
|
||||||
*/
|
|
||||||
WATCHDOG_REMOVE_IT
|
|
||||||
} Watchdog_States;
|
} Watchdog_States;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -316,20 +316,6 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This routine deactivates THE_WATCHDOG timer which will remain
|
|
||||||
* on a watchdog chain.
|
|
||||||
*/
|
|
||||||
|
|
||||||
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
|
|
||||||
Watchdog_Control *the_watchdog
|
|
||||||
)
|
|
||||||
{
|
|
||||||
|
|
||||||
the_watchdog->state = WATCHDOG_REMOVE_IT;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This routine is invoked at each clock tick to update the ticks
|
* This routine is invoked at each clock tick to update the ticks
|
||||||
* watchdog chain.
|
* watchdog chain.
|
||||||
|
|||||||
@@ -31,10 +31,7 @@ static void _Watchdog_Remove_it(
|
|||||||
const Chain_Node *iterator_tail;
|
const Chain_Node *iterator_tail;
|
||||||
Chain_Node *iterator_node;
|
Chain_Node *iterator_node;
|
||||||
|
|
||||||
_Assert(
|
_Assert( the_watchdog->state == WATCHDOG_ACTIVE );
|
||||||
the_watchdog->state == WATCHDOG_ACTIVE
|
|
||||||
|| the_watchdog->state == WATCHDOG_REMOVE_IT
|
|
||||||
);
|
|
||||||
|
|
||||||
the_watchdog->state = WATCHDOG_INACTIVE;
|
the_watchdog->state = WATCHDOG_INACTIVE;
|
||||||
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
|
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
|
||||||
@@ -99,7 +96,6 @@ Watchdog_States _Watchdog_Remove(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case WATCHDOG_ACTIVE:
|
case WATCHDOG_ACTIVE:
|
||||||
case WATCHDOG_REMOVE_IT:
|
|
||||||
_Watchdog_Remove_it( header, the_watchdog );
|
_Watchdog_Remove_it( header, the_watchdog );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user