This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: how to handle missed interrupt issue?


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]