From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25326 invoked by alias); 12 Feb 2009 01:58:23 -0000 Received: (qmail 25317 invoked by uid 22791); 12 Feb 2009 01:58:22 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: sourceware.org Received: from Dividenda.externet.hu (HELO dividenda.externet.hu) (212.40.96.44) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 12 Feb 2009 01:58:13 +0000 Received: from [192.168.1.3] (fibhost-176-206.fibernet.bacs-net.hu [85.66.176.206]) by dividenda.externet.hu (Postfix) with ESMTP id E15C7636DD for ; Thu, 12 Feb 2009 02:58:09 +0100 (CET) Message-ID: <4993822B.7010405@axelero.hu> Date: Thu, 12 Feb 2009 01:58:00 -0000 From: Szentirmai Gergely User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: eCos Discuss Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: [ECOS] Interrupt vs Thread - shared resource X-SW-Source: 2009-02/txt/msg00059.txt.bz2 Hello I describe my problem with a simplified example: I have a thread, which works with a buffer, and an ISR (or DSR), which would add some byte to this buffer too, so it is a shared resource. Since it is unable wait for a flag, or mutex in ISR, when the thread's code working with the buffer, the interrupt can jam the data. The only solution is to disable the interrupt for that critical section in the thread? Isn't there a better solution? I hope I was clear. Thanks! Gergely Szentirmai -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss