public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Alexey Shusharin <mrfinch@mail.ru>
To: Sergei Gavrikov <w3sg@SoftHome.net>
Cc: cetoni GmbH - Uwe Kindler <uwe.kindler@cetoni.de>,
	  ecos-discuss@sourceware.org
Subject: Re: [ECOS] Re: Waiting I/O operation
Date: Mon, 23 Jul 2007 10:15:00 -0000	[thread overview]
Message-ID: <46A47E63.9060704@mail.ru> (raw)
In-Reply-To: <1185181947.14557.14.camel@sg-ubuntu>

Sergei Gavrikov wrote:
> В Пнд, 23/07/2007 в 11:05 +0700, Alexey Shusharin пишет:
>> Sergei Gavrikov wrote:
>>> Hello,
>> Hello all,
>> I'm not eCos kernel expert but I think we can use cyg_flag_setbits() in 
>> DSR level.
>>
>>> 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.
>> Yes, we can't block in a DSR and IMHO cyg_flag_setbits() doesn't do it.
>> If we compare Cyg_Flag::setbits() (in flag.cxx) and 
>> Cyg_Condition_Variable::sygnal() (in mutex.cxx) we will see that there 
>> are no fundamental differences. So, if we can call sygnal() in a DSR we 
>> are able to call setbits() too.
>>
>>> 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().
>> drv_api.c is the implementation of driver API in configuration without 
>> kernel. If we use a kernel, directives in dri_api.h select kapi.c 
>> implementation (kernel C API). And we use code from mutex.cxx and other 
>> kernel code eventually.
>>
>>> 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
>>> 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
>> Yes, if you use functions from drv_api.h only, your application can be a 
>> kernel-less. And this is the reason why you didn't find using of flags 
>> in drivers. It's not recommended because the flag is not included in 
>> driver API.
> 
> Hello,
> 
> The DSR is a kernel driven stuff. As I understood before... The eCos
> scheduler manages the deffered service routings.

Yes, if kernel is enabled. But if not, DSRs are calling from 
call_dsrs(), which is calling from cyg_drv_cond_wait() (in drv_api.c) 
and maybe from other kernel-less configuration functions.

I think you was right in first time. ;-)

Regards
Alexey

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

  reply	other threads:[~2007-07-23 10:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-19  8:47 cetoni GmbH - Uwe Kindler
2007-07-19  9:53 ` Alexey Shusharin
2007-07-19 10:39   ` cetoni GmbH - Uwe Kindler
2007-07-19 10:56     ` Alexey Shusharin
2007-07-19 10:41   ` Alexey Shusharin
2007-07-19 10:47   ` Sergei Gavrikov
2007-07-20 19:35     ` Andrew Lunn
2007-07-21 11:22       ` Sergei Gavrikov
2007-07-21 13:21       ` Uwe Kindler
2007-07-21 15:11         ` Sergei Gavrikov
2007-07-21 15:25           ` Sergei Gavrikov
2007-07-23  4:10           ` Alexey Shusharin
2007-07-23  5:53             ` Uwe Kindler
2007-07-23  9:12             ` Sergei Gavrikov
2007-07-23 10:15               ` Alexey Shusharin [this message]
2007-07-23 18:49                 ` Sergei Gavrikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46A47E63.9060704@mail.ru \
    --to=mrfinch@mail.ru \
    --cc=ecos-discuss@sourceware.org \
    --cc=uwe.kindler@cetoni.de \
    --cc=w3sg@SoftHome.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).