[ECOS] [ecos] synchronization level of cyg_drv_cond_broadcast

Jonathan Larmour jlarmour@redhat.com
Tue Oct 30 06:22:00 GMT 2001


Schmidt Henning Larsen wrote:
> 
> > >
> > > Hi
> > >
> > > Why is the syncronization level of cyg_drv_cond_broadcast: DSR.
> > > I meen it's a nonblocking call !?
> >
> > You mean you expect to use it in an ISR too? The answer is no
> > as it might
> > corrupt kernel structures that are only protected by a DSR
> > lock, not by
> > disabling interrupts. This is entirely intentional.
> 
> Ok thanks.
> How about cyg_semaphore_post() can I use that in a ISR.

No, you can't use anything like that in an ISR. Either use a DSR, or manage
some shared state yourself and disable interrupts around the accesses to
it. DSRs are meant to be the mechanism to synchronise between threads and
interrupts.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine



More information about the Ecos-discuss mailing list