[ECOS] Possible Bug in Cyg_Alarm ...
Larice Robert
larice@vidisys.de
Wed Aug 7 00:51:00 GMT 2002
> Hi folks!
> I think I might have discovered a bug in the alarm handling of ECOS. If two (or more) alarms are set up to fire at the very same counter value, only one (the first that is initialized) istriggered , even if an interval is specified.
> The problem is due to the fact that an alarm is only added to a Cyg_Counter if its trigger value is > (instead of >=) than the counter value.
hello Thomas,
a tiny improvement of your problem description is to say:
Cyg_Counter::add_alarm() fails to add a given alarm to alarm_list
(CYGIMP_KERNEL_COUNTERS_SORT_LIST implementation)
if there happens to be an alarm for the same time at the tail of
alarm_list
(note the tail aspect, if you just look for > versus >= one would not
understand why this should make any difference, unless one checks
for the end of the do .. while condition)
i vote for your patch.
but it is necessairy to check whether there is somewhere a specification
which gurantees the execution order of alarm callbacks.
your patch reverses this order.
Robert Larice
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list