Cc: Rafael J. Wysocki <rjw@...>, Pierre Ossman <drzeus-mmc@...>, Zdenek Kabelac <zdenek.kabelac@...>, Kernel development list <linux-kernel@...>, pm list <linux-pm@...>
I always thought that reads and writes of pointers are atomic, just
like reads and writes of longs. Is that wrong?
Now if pointers were the same size as long long then I would agree with
you.
That would work just as well. Except that it wouldn't need to be
atomic_t, because current->pid is always an integer (not guaranteed, I
suppose, but that's what it is on all current architectures) and
reads/writes of ints _are_ atomic.
Alan Stern
--