Re: why are some atomic_t's not volatile, while most are?

From: Robert P. J. Day
Date: Thu Aug 09 2007 - 14:08:32 EST


On Thu, 9 Aug 2007, Chris Snook wrote:

> Robert P. J. Day wrote:

> > i'm almost scared to ask any more questions. :-)
> >
> > rday
>
> Momentarily I'll be posting a patchset that makes all atomic_t and
> atomic64_t declarations non-volatile, and casts them to volatile
> inside of atomic[64]_read. This will ensure consistent behavior
> across all architectures, and is in keeping with the philosophy that
> memory reads should be enforced in running code, not declarations.
>
> I hope you don't mind that we're mooting the question by making the
> code more sensible.

not at all, but it does bring up the obvious next question -- once all
these definitions are made consistent, is there any reason some of
that content can't be centralized in a single atomic.h header file,
rather than duplicating it across a couple dozen architectures?

surely, after this process, there's going to be some content that's
identical across all arches, no?

rday

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/