This is the mail archive of the ecos-discuss@sourceware.org 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: Re: Waiting I/O operation


On Sat, Jul 21, 2007 at 06:10:40PM +0300, Sergei Gavrikov wrote:
> On Sat, Jul 21, 2007 at 03:19:55PM +0200, Uwe Kindler wrote:
> > This is what the documentation says about flags and DSRs:
> > 
> > http://ecos.sourceware.org/docs-latest/ref/kernel-flags.html
> > 
> > So it seems to be possible to use cyg_flag_setbits() from DSRs.
> 
> > Andrew Lunn schrieb:
> > >>But, one my today DSR uses the cyg_flag_setbits() notifier and that
> > >>works as I could expect. I found that is more simple, because that
> > >>doesn't need itself in a mutex. I wonder about the right hacking from
> > >>the eCos experts.
> > >
> > >You are not allowed to block in a DSR. So look through the
> > >cyg_flag_setbits() code and see if it calls any functions to block
> > >itself. 
> > >
> > >        Andrew
> 
> Hello,
> 
> As I could understand Andrew's main concern, that is, We aren't allowed
> to block in a DSR (cyg_flag_setbits() do it), and I am agree with him. I
> looked at the common hal's drv_api.c against the kernel's flag.cxx.  As
> I could see the cyg_drv_cond_*() calls are almost the atomic funcs. I
> wouldn't say same thing about the kernel's Cyg_Flag::setbits().
> 
> More that, I liked cyg_drv_cond_wait(), because that is just it
> 
> while (cond->wait == 1) { call_dsrs (); }
> 
> So, my application can be a kernel-less application too. I think the
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Ups, I did schrieb that in a figth. This is no thruth :-) But, I hope
what the other points are the arguments.

        Sergei


> table from Chapter 13 is a good guide-line: a what allowed us to run
> from DSR:
> 
> http://ecos.sourceware.org/docs-latest/ref/devapi-synchronization-levels.html
> 
> So, I did believe in that two crosses more after Andrew's suggest to
> U.T.S.L :-) I did believe in those crosses even more after a comparation
> 
>   find $ECOS_REPOSITORY/{io,devs} | xargs grep cyg_drv_cond_
> 
>     against
> 
>   find $ECOS_REPOSITORY/{io,devs} | xargs grep cyg_flag_
> 
> We all did talk about the DSR's possibilities, didn't all? IMHO, that is
> in the most an eCos driver related thing.
> 
>         Sergei
> 
> 
> -- 
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]