[ECOS] how to handle missed interrupt issue?

Paul D. DeRocco pderocco@ix.netcom.com
Fri Feb 6 18:36:00 GMT 2009


> From: Dave Milter [mailto:davemilter@gmail.com]
>
> you think that settting flag on arm9 is atomic thing?
>
> I look at code atomic in linux kernel, in case of arm9 (armv5 core) it
> disable interrupts set flag and then enable interrupts.

Unconditionally setting a byte flag is certainly atomic, on any CPU.
Incrementing a flag isn't, nor is testing it and setting, which means that
these things can only be done by something that isn't interruptible.

If the application stores 1 in a byte, the interrupt handler can safely test
and set it back to 0 it at the beginning. This should work even in an SMP
environment, because only one CPU will run the interrupt handler at a time.

Whether this solves the original problem, I have no idea.

--

Ciao,               Paul D. DeRocco
Paul                mailto:pderocco@ix.netcom.com


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list