Stuck in a 'for' loop in _Watchdog_Insert.

Nick Thomas nick.thomas at pixsan.com
Thu May 20 05:49:52 UTC 2010


Hi, I am using RTEMS 4.7.1, on PowerPC.

I have just seen an odd behavior in watchdoginsert.c, in the
_Watchdog_Insert function.

It looks like there is one Watchdog_Control in the chain, because the
Previous and Next nodes in the linked list point to itself. So the
_Watchdog_Next( after ) always returns the same Watchdog_Control struct.

Also, the after->delta_interval is zero.

But, the delta_interval variable in _Watchdog_Insert is 99. So, the
delta_interval is never getting dcremented.

Consequently, there is no way out of the 'for' loop!


I have commented out the _ISR_Flash( level ); call according to the comments
on that file, but this problem still happens from time to time.


So, what could cause this problem?
1) Is it right that the chain nodes point to itself? I would expect the last
one to be NULL to mean the end of the list.
2) Can the after->delta_interval be zero in normal operation?

Help appreciated.


Regards

Nick

-----------------------------
Nick Thomas
Email: nick.thomas at pixsan.com 




More information about the users mailing list