From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20657 invoked by alias); 9 Jun 2006 09:27:06 -0000 Received: (qmail 20649 invoked by uid 22791); 9 Jun 2006 09:27:05 -0000 X-Spam-Check-By: sourceware.org Received: from londo.lunn.ch (HELO londo.lunn.ch) (80.238.139.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 09 Jun 2006 09:27:01 +0000 Received: from lunn by londo.lunn.ch with local (Exim 3.36 #1 (Debian)) id 1FodGc-0006jk-00; Fri, 09 Jun 2006 11:26:58 +0200 Date: Fri, 09 Jun 2006 09:27:00 -0000 To: Monica Dsz Cc: ecos discuss Message-ID: <20060609092658.GX15066@lunn.ch> Mail-Followup-To: Monica Dsz , ecos discuss References: <000501c68b1a$68b523b0$ea14a8c0@taurus> <1149789900.15359.183.camel@hermes> <000701c68ba5$a56bd4d0$ea14a8c0@taurus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000701c68ba5$a56bd4d0$ea14a8c0@taurus> User-Agent: Mutt/1.5.11+cvs20060403 From: Andrew Lunn X-IsSubscribed: yes 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 Subject: Re: [ECOS] why is it wrong to call cyg_semaphore_post() in ISR??? X-SW-Source: 2006-06/txt/msg00093.txt.bz2 On Fri, Jun 09, 2006 at 11:18:14AM +0200, Monica Dsz wrote: > > >It's a trade off - do you prevent interrupts (hence ISR routines) from > >running during all data critical sections or do you simply not allow > >those [ISR] functions to execute code that might perturb critical data? > >eCos chooses the latter method which allows for lower interrupt latency > >by putting off things until the DSR can be safely run. > > > > just to confirm my understanding, does this mean that we never have to > disable and re-enable the interrupts during critical sections? or are there > any cases still we have to disable the interrupts in eCos. Normally, you try not to disable interrupts in RTOS's. You should protect your critical regions with mutex's, semaphores etc. 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