This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Re: about ecos dsr and the serial_write function
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: Eric Doenges <Eric dot Doenges at DynaPel dot de>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: 23 Jul 2003 10:45:56 +0100
- Subject: Re: [ECOS] Re: about ecos dsr and the serial_write function
- References: <001201c350f2$c80cb6d0$e33922c7@ericnt><3F1E4B45.5080701@DynaPel.de>
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