* [ECOS] Efficient way to wake up a task...
@ 2005-06-22 16:29 Guilly A
2005-06-22 17:42 ` Andrew Lunn
0 siblings, 1 reply; 2+ messages in thread
From: Guilly A @ 2005-06-22 16:29 UTC (permalink / raw)
To: ecos-discuss
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.
Rq : the task to be waken has the highest priority of my system, and in the
ISR I just copy a 256bytes long buffer to a static buffer and send the
wake-up signal...
_________________________________________________________________
Ne cherchez plus, trouvez ! Avec le nouveau MSN Search.
http://search.msn.fr/
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ECOS] Efficient way to wake up a task...
2005-06-22 16:29 [ECOS] Efficient way to wake up a task Guilly A
@ 2005-06-22 17:42 ` Andrew Lunn
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2005-06-22 17:42 UTC (permalink / raw)
To: Guilly A; +Cc: ecos-discuss
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-06-22 17:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-22 16:29 [ECOS] Efficient way to wake up a task Guilly A
2005-06-22 17:42 ` Andrew Lunn
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).