Check that a virtual timer has not been set already
Brought to you by:
gdisirio,
roccomarco
Hi.
The attached patch checks that a virtual timer has been cleared before being set again. One of my students got affected today and apparently corrupted the virtual timers linked list by setting again a virtual timer which had not triggered yet.
This patch cannot be added as-is as the virtual timer structure is not necessarily zeroed. That would require an API change to add a chVTinit(), so I guess you don't want to apply this.
Hi,
Timers in 2.6.x are meant to work that way. In 3.0 the timers already have the behavior you expected so you could just switch to the new version.