[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46C2FB81.8040307@s5r6.in-berlin.de>
Date: Wed, 15 Aug 2007 15:11:29 +0200
From: Stefan Richter <stefanr@...6.in-berlin.de>
To: Satyam Sharma <satyam@...radead.org>
CC: Christoph Lameter <clameter@....com>,
Chris Snook <csnook@...hat.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-arch@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
netdev@...r.kernel.org, Andrew Morton <akpm@...ux-foundation.org>,
ak@...e.de, heiko.carstens@...ibm.com, davem@...emloft.net,
schwidefsky@...ibm.com, wensong@...ux-vs.org, horms@...ge.net.au,
wjiang@...ilience.com, cfriesen@...tel.com, zlynx@....org,
rpjday@...dspring.com, jesper.juhl@...il.com,
segher@...nel.crashing.org,
Herbert Xu <herbert@...dor.apana.org.au>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: Re: [PATCH 0/24] make atomic_read() behave consistently across all
architectures
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists