This is the mail archive of the ecos-discuss@sources.redhat.com 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: about ecos dsr and the serial_write function


Eric Doenges <Eric.Doenges@DynaPel.de> writes:

> [ I'm replying to Eric de Jong's post instead of
>    the original because I seem to have missed the
>    original ]

I didn't see it either, I wonder what happened to it.

> I asked myself this very same question (for a different platform). As
> far as I understand the kernel sources, cyg_drv_cond_wait will unlock
> the scheduler, running all previously scheduled DSRs in the process, and
> then relock DSRs (and the scheduler if it was locked before the call)
> when the _wait returns. I might be wrong in my interpretation of the
> kernel sources, however.

This is almost right. The scheduler lock is essentially a per-thread
variable. A thread can wait with the lock at any value, but as soon as
the kernel switches to a thread that has its version of the lock at
zero, then the DSRs will be run. The lock is restored to the thread's
private value when is it eventually rescheduled.

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


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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