public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Guilly A <guilly_work@hotmail.com>
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] Efficient way to wake up a task...
Date: Wed, 22 Jun 2005 17:42:00 -0000	[thread overview]
Message-ID: <20050622173907.GA8444@lunn.ch> (raw)
In-Reply-To: <BAY107-F259EC01B7D0211464B86F293EB0@phx.gbl>

On Wed, Jun 22, 2005 at 04:29:42PM +0000, Guilly A wrote:
> Hi
> I need to wake up a task after an interruption handling.
> I am wondering which is the more efficient way to do that :
> 1- suspend the task and resume it in the ISR
> 2- make the task wait forever for a flag and set the flag in the ISR
> 3- use mailboxes.
> 
> On pSos, I used an event sending to wake up my task. I heard it was the 
> fastest way and lowest memory cost do do it, compared to mailbox. But I had 
> no evidence about it, I believed it naively.
> I don't know how is it for eCos.
> 
> Thank you for your advices.

You should probably do the copy in the ISR. You then need to return
CYG_ISR_CALL_DSR so that a DSR is called. The DSR can then post on a
semaphore which will awaken the thread waiting on the semaphore.

        Andrew

-- 
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:[~2005-06-22 17:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-22 16:29 Guilly A
2005-06-22 17:42 ` Andrew Lunn [this message]

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=20050622173907.GA8444@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=ecos-discuss@sources.redhat.com \
    --cc=guilly_work@hotmail.com \
    /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).