Re: why is it called "asm-generic/atomic.h"?
From: Stefan Richter
Date: Thu Jun 07 2007 - 11:31:32 EST
Robert P. J. Day wrote:
> i'm just curious -- why does that particular header file have that
> name? its opening comment reads:
>
> * Allows to provide arch independent atomic definitions without the need to
> * edit all arch specific atomic.h files.
>
> but that's *not* what that header file does.
The file name is correct, and the comment is correct too. It indeed
_allows_ to define architecture-independent operations on atomic types,
and it currently does so for atomic_long_t. There is no need to do so
for atomic_t, because all architectures already had their own set of
atomic_t operations when asm-generic/atomic.h was added. (And I presume
they varied too much to justify an additional generic implementation
plus #ifndef HAVE_ARCH_SOMETHING games.)
PS: The atomic_long_t operations currently don't need to be protected
by #ifndef HAVE_ARCH_SOMETHING and won't need to be in foreseeable
future, therefore they don't have this protection.
--
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/