This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: AW: Blocking restricted in DSRs
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: "Neundorf, Alexander" <Alexander dot Neundorf at jenoptik dot com>
- Cc: <bob dot koninckx at o-3s dot com>, <ecos-discuss at sources dot redhat dot com>
- Date: 27 Jul 2004 09:08:26 +0100
- Subject: Re: AW: [ECOS] Blocking restricted in DSRs
- References: <5A8A17126B73AC4C83968F6C4505E3C5E3EADA@JO-EX01.JENOPTIK.NET>
"Neundorf, Alexander" <Alexander.Neundorf@jenoptik.com> writes:
>
> > Things like waiting for a semaphore. Blocking is something you do at
> > thread level. The thread "blocks" (or goes to sleep) until another
> > thread or interrupt wakes it up again. Basically, this waking
> > up is done
> > by the scheduler, which explains why you should not block in a DSR,
> > which is called _before_ the scheduler.
> >
> > Hope this makes it a little bit clearer,
> >
> > Bob
>
> Ok, the docu says sending signals to condition variables is ok from
> a DSR. But AFAIK this has always be done together with locking the
> associated mutex first... from the DSR then. But the docu also says
> using cyg_mutex_lock() should be used only from thread context, not
> from DSR. So, what's the right way then ?
It also says that cyg_mutex_signal() can be called without locking the
associated mutex first. This is how it must be used from the DSR.
--
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