This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: I2C driver DSR locking
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: "Paul D. DeRocco" <pderocco at ix dot netcom dot com>
- Cc: "eCos Discuss" <ecos-discuss at ecos dot sourceware dot org>
- Date: 10 Apr 2007 11:31:12 +0100
- Subject: Re: [ECOS] I2C driver DSR locking
- References: <001501c776da$95f5cad0$8d7ba8c0@PAULD>
"Paul D. DeRocco" <pderocco@ix.netcom.com> writes:
> > From: Nick Garnett
> >
> > It is a general feature of all thread suspension. Each
> > thread's scheduler lock level is essentially part of its
> > state and is saved and restored across all thread switches.
> > Historically this was not always the case, and cond_wait had
> > special code to support this kind of use. But it was
> > considered so useful that I made it a generic feature several
> > years ago.
>
> So the implication of this is that when a thread holds the DSR lock, it
> can't be pre-empted, but it can still yield or sleep of its own volition. Is
> that correct?
That is correct, it seemed to be the most useful behaviour.
--
Nick Garnett eCos Kernel Architect
eCosCentric Limited http://www.eCosCentric.com/ The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss