From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29975 invoked by alias); 9 Jun 2006 09:43:27 -0000 Received: (qmail 29966 invoked by uid 22791); 9 Jun 2006 09:43:26 -0000 X-Spam-Check-By: sourceware.org Received: from py-out-1112.google.com (HELO py-out-1112.google.com) (64.233.166.179) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 09 Jun 2006 09:43:23 +0000 Received: by py-out-1112.google.com with SMTP id d80so772939pyd for ; Fri, 09 Jun 2006 02:43:22 -0700 (PDT) Received: by 10.35.106.18 with SMTP id i18mr2295506pym; Fri, 09 Jun 2006 02:43:21 -0700 (PDT) Received: from taurus ( [82.100.245.2]) by mx.gmail.com with ESMTP id a75sm1528848pyf.2006.06.09.02.43.20; Fri, 09 Jun 2006 02:43:21 -0700 (PDT) Message-ID: <000d01c68ba8$f4a071c0$ea14a8c0@taurus> From: "Monica Dsz" To: "Andrew Lunn" Cc: "ecos discuss" References: <000501c68b1a$68b523b0$ea14a8c0@taurus> <1149789900.15359.183.camel@hermes> <000701c68ba5$a56bd4d0$ea14a8c0@taurus> <20060609092658.GX15066@lunn.ch> Date: Fri, 09 Jun 2006 09:43:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook Express 6.00.2900.2869 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/msg00094.txt.bz2 > Normally, you try not to disable interrupts in RTOS's. You should > protect your critical regions with mutex's, semaphores etc. > I remember well that I(we in our company) have used intLock () in VxWorks to make sure that interrupt doesnt during some critical sections. Ofcourse we did use semaphores and mutexes to guard against other threads but as far as I remember i never used semaphores/mutexes to guard against interrupts. lockKey = intLock (); ... (work with interrupts locked out) intUnlock (lockKey); Seems in eCos we dont need to disable interrupts because interrupts doesnt perform any kernal calls and we can use DSR to give semaphores and etcthank you -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss