Cc: Pavel Machek <pavel@...>, Paul E. McKenney <paulmck@...>, Linus Torvalds <torvalds@...>, Andrew Morton <akpm@...>, Zdenek Kabelac <zdenek.kabelac@...>, <davem@...>, Rafael J. Wysocki <rjw@...>, Pierre Ossman <drzeus-mmc@...>, Kernel development list <linux-kernel@...>, pm list <linux-pm@...>
Miscommunication and lack of clarity. CPU reads and writes _are_
guaranteed to be atomic. What is not guaranteed is that the compiler
will generate a single read or write instruction corresponding to a
particular expression in C.
Consider a routine like the following:
static task_struct *the_task;
void store_task(void)
{
the_task = current;
}
Is it possible to say whether readers examining "the_task" are
guaranteed to see a coherent value?
Alan Stern
--