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: Re: DSR stops running after heavy interrupts. Bug found?


Sergei Organov <osv@javad.com> writes:

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

In SMP configurations we don't want to claim the scheduler lock in the
interrupt VSR because it would block interrupts and scheduler
operations on other CPUs. It also requires a spinlock to be claimed,
which would require special code to be written -- it's much easier to
do the job later. In HALs where SMP is supported, the usual scheduler
lock increment is ifdeffed out.

Perhaps a comment would be useful, but it seemed like the ifdef
surrounding it would be sufficient indication that this was for SMP
only. 


-- 
Nick Garnett                                 eCos Kernel Architect
http://www.ecoscentric.com            The eCos and RedBoot experts


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