From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10396 invoked by alias); 22 Jun 2005 17:42:23 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 10365 invoked by uid 22791); 22 Jun 2005 17:42:21 -0000 Received: from londo.lunn.ch (HELO londo.lunn.ch) (80.238.139.98) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 22 Jun 2005 17:42:21 +0000 Received: from lunn by londo.lunn.ch with local (Exim 3.36 #1 (Debian)) id 1Dl9Br-00050A-00; Wed, 22 Jun 2005 19:39:07 +0200 Date: Wed, 22 Jun 2005 17:42:00 -0000 To: Guilly A Cc: ecos-discuss@sources.redhat.com Message-ID: <20050622173907.GA8444@lunn.ch> Mail-Followup-To: Guilly A , ecos-discuss@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i From: Andrew Lunn Subject: Re: [ECOS] Efficient way to wake up a task... X-SW-Source: 2005-06/txt/msg00207.txt.bz2 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