One of the 200 interrupts does not get executed sometimes due to a single statement

Without hardware information its impossible to answer. On most processors the isr is entered because the interrupt flag has been set so there is no requirement to check it again. If you clear the flag at the start of the isr then you wont miss an interrupt that occurs during the isr, the hardware will just rerun the isr. You would miss then if there were 2 or more occuring. Correctly prioritising will solve most problems. Later in this thread you mention software interrupts, you cannot get this sort of problem with those as their code generated.

Reply to
cbarn24050
Loading thread data ...

I am using Vxworks with PowerPC. I Need to handle interrupts that may occur when the other interrupt is being handled.(Nested Interrupts). I find that sometimes , one of the interrupt gets lost and the corresponding alarm gets generated as that interrupt got skipped off.

Regards, Karthik Balaguru

Reply to
karthikbg

I make the assumption here that increments/decrements/tests of int's are atomic. Perhaps a comment to that effect should be added to alert a developer for whom this is not the case.

Reply to
Rufus V. Smith

Oh, I thought

interrupt_flag = 0;

effectively would re-enable that interrupt, so the routine could possibly be re-entered at that point, just counting and re-enabling.

Rufus

Reply to
Rufus V. Smith

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.