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: cyg_scheduler_lock() understanding...


On Tue, 2005-10-18 at 14:54 +0200, Stefan Sommerfeld wrote:
> Hi,
> 
> I still search for the delay DSR and found it that the DSR will be 
> permitted due to a scheduler_lock. I quickly have some question while going 
> deeper into ecos.
> 
> Does the scheduler_lock also permits the thread switching? Or is it 
> possible that the scheduler switches to another thread while in lock mode?
> 
> If thread switching is permitted, how could the scheduler_lock be higher 
> than one if no dsr or isr calls scheduler_lock()?

Actually, every ISR causes a scheduler lock (it's part of the entry
protocol into the system).  So, if the scheduler was locked for some
other reason before the ISR happened, it will still be locked when it
finishes and DSR processing will be postponed until it is freed (i.e.
the scheduler lock value returns to zero).

You can determine, in great detail, what's happening here by enabling
the system trace/log features.  This will tell you when the scheduler
gets locked (and where), when interrupts occur, etc.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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