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: cyg_io_write from DSR ?


On Fri, May 23, 2003 at 10:41:47AM +0200, Schmidt Henning Larsen wrote:
> > > 
> > > Can I call cyg_io_write from a DSR?
> > 
> > No. It might try to block and you cannot block in a DSR.
> > 
> >     Andrew
> > 
> 
> I know that the DSR is the only one using it, so I don't block, but can it
> corrupt the inner of the scheduler?

There are other reasons it could block than simple mutual
exclusion. eg what happens when your output buffer is full? Normally
the driver blocks until the output buffer has some more space.

What you want to do is not safe. You are relying on a special set of
conditions being true in order that your system does not crash. To me
this is too risky and i would do it the proper way using a thread.

     Andrew

-- 
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]