Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761678AbXHONLo (ORCPT ); Wed, 15 Aug 2007 09:11:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756412AbXHONLc (ORCPT ); Wed, 15 Aug 2007 09:11:32 -0400 Received: from hp3.statik.tu-cottbus.de ([141.43.120.68]:38193 "EHLO hp3.statik.tu-cottbus.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752303AbXHONLa (ORCPT ); Wed, 15 Aug 2007 09:11:30 -0400 Message-ID: <46C2FB81.8040307@s5r6.in-berlin.de> Date: Wed, 15 Aug 2007 15:11:29 +0200 From: Stefan Richter User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 MIME-Version: 1.0 To: Satyam Sharma CC: Christoph Lameter , Chris Snook , Linux Kernel Mailing List , linux-arch@vger.kernel.org, Linus Torvalds , netdev@vger.kernel.org, Andrew Morton , ak@suse.de, heiko.carstens@de.ibm.com, davem@davemloft.net, schwidefsky@de.ibm.com, wensong@linux-vs.org, horms@verge.net.au, wjiang@resilience.com, cfriesen@nortel.com, zlynx@acm.org, rpjday@mindspring.com, jesper.juhl@gmail.com, segher@kernel.crashing.org, Herbert Xu , "Paul E. McKenney" Subject: Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures References: <20070809131423.GA9927@shell.boston.redhat.com> <46C2D6F3.3070707@s5r6.in-berlin.de> <46C2FADB.7020407@s5r6.in-berlin.de> In-Reply-To: <46C2FADB.7020407@s5r6.in-berlin.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 743 Lines: 37 I wrote: > static inline void A(atomic_t *a) > { > int b = atomic_read(a); > if (b) > do_something_time_consuming(); > } > > static inline void B(atomic_t *a) > { > int b = atomic_read(a); > if (b) > do_something_more(); > } > > static void C(atomic_t *a) > { > A(a); > B(b); /* ^ typo */ B(a); > } > > Would this need forget(a) after A(a)? > > (Is the latter actually answered in C99 or is it compiler-dependent?) -- Stefan Richter -=====-=-=== =--- -==== http://arcgraph.de/sr/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/