[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 3 Mar 2008 15:48:31 +0000
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: Pavel Machek <pavel@....cz>
Cc: Alan Stern <stern@...land.harvard.edu>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...l.org>,
Zdenek Kabelac <zdenek.kabelac@...il.com>, davem@...emloft.net,
"Rafael J. Wysocki" <rjw@...k.pl>,
Pierre Ossman <drzeus-mmc@...eus.cx>,
Kernel development list <linux-kernel@...r.kernel.org>,
pm list <linux-pm@...ts.linux-foundation.org>
Subject: Re: [patch] Re: using long instead of atomic_t when only set/read
is required
> Ok, so linux actually atomicity of long?
No it doesn't. And even if it did you couldn't use long for this because
atomic_t also ensures the points operations complete are defined. You
might just about get away with volatile long * objects on x86 for simple
assignments but for anything else gcc can and will generate code to
update values whichever way it feels best - which includes turning
long *x = a + b;
into
*x = a;
*x += b;
Alan
--
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