From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28551 invoked by alias); 3 Apr 2007 14:50:19 -0000 Received: (qmail 28542 invoked by uid 22791); 3 Apr 2007 14:50:19 -0000 X-Spam-Check-By: sourceware.org Received: from 204-133-123-27.dia.static.slbbi.com (HELO mail.chez-thomas.org) (204.133.123.27) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 03 Apr 2007 15:50:13 +0100 Received: by mail.chez-thomas.org (Postfix, from userid 999) id 53D191950111; Tue, 3 Apr 2007 08:50:11 -0600 (MDT) Received: from [192.168.1.101] (hermes_local [192.168.1.101]) by mail.chez-thomas.org (Postfix) with ESMTP id 108BE19500A2; Tue, 3 Apr 2007 08:50:09 -0600 (MDT) Message-ID: <461269A0.3050006@mlbassoc.com> Date: Tue, 03 Apr 2007 14:50:00 -0000 From: Gary Thomas User-Agent: Thunderbird 1.5.0.8 (X11/20061107) MIME-Version: 1.0 To: Grant Edwards CC: ecos-discuss@sources.redhat.com References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; 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: Re: [ECOS] Re: Does ethernet driver "deliver" method need to be re-entrant? X-SW-Source: 2007-04/txt/msg00027.txt.bz2 Grant Edwards wrote: > On 2007-04-01, Grant Edwards wrote: > >> I'm having intermittent problems with an Ethernet driver. One >> possible explanation would be if the driver's "deliver" method >> was being called "simultaneously" from two different contexts. >> >> Can this happen, or are calls to deliver guaranteed to be >> serialized? > > The problem caused by a race condition in a different section > of the driver. I'm not sure why the author of the driver > didn't put in mutexes. The sample driver we gave him to follow > had them. > > Anywy, I still need to know if deliver needs to be re-entrant > or not. It looks to me like not -- it is called only from a > DSR context by an alarm handler in the stack, right? > > It would be nice if the driver API documentation state whether > each driver method needed to be re-entrant or not... > There is no expectation for any of the ethernet driver functions to be reentrant. Serialization is handled by the other layers that call these functions. -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------ -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss