watchdog insertion order
shizheng
neversetsun at ustc.edu
Fri Jul 13 13:56:54 UTC 2007
Hi,all:
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
...
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first
;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
~~~~~~~~~~~~~~~~~~~/*if a new watchdog's delta_interval is 0,
it will be inserted before all the existing watchdogs with 0 delta_interval */
break;
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
...
}
As a result, the element in the watchdog chain has an opposite order to
the insertion order.
Did I miss something?
regards, shizheng
More information about the users
mailing list