[ECOS] Re: DSR stops running after heavy interrupts. Bug found?

Sergei Organov osv@javad.com
Mon Apr 10 10:44:00 GMT 2006


Nick Garnett <nickg@ecoscentric.com> writes:
>  Sergei Organov <osv@javad.com> writes:
>
>> Andrew Lunn <andrew@lunn.ch> writes:
>> 
>> [...]
>> 
>> > However, from what you are saying it sounds like there needs to be
>> > another comparison afterwards. Something like:
>> >
>> >         and     r0,r0,#2 // CYG_ISR_CALL_DSR
>> >         beq     17f
>> 
>> No, bit checking of the ISR return value is performed inside the
>> interrupt_end() routine:
>> 
>>     if( isr_ret & Cyg_Interrupt::CALL_DSR && intr != NULL ) intr->post_dsr()
>
>
> Exactly. And there are other housekeeping things that go on in
> interrupt_end() which cannot be skipped. The most important of these
> is decrementing the scheduler lock.
>
> I don't really see how the original poster's problem is fixed by
> trying to skip interrupt_end(), I would only expect doing that to
> aggravate the problem. The scheduler lock is acquired early in
> interrupt processing -- before the ISR is called and we know whether
> there is a DSR to call. interrupt_end() decrements the scheduler lock
> and as a side-effect may cause any DSRs to be called.

A little OT while we are at interrupt_end(). Could you please explain
why

#ifdef CYGPKG_KERNEL_SMP_SUPPORT
    Cyg_Scheduler::lock();
#endif

is there at the beginning, -- looks like extra scheduler lock without
corresponding unlock for SMP case. If not a bug, it seems a comment
would be nice to have there.

-- Sergei.

-- 
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