From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 MIME-Version: 1.0 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-arch-owner@vger.kernel.org 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" List-ID: 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/