Re: why is it called "asm-generic/atomic.h"?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux