lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 07 Jun 2007 17:31:18 +0200
From:	Stefan Richter <stefanr@...6.in-berlin.de>
To:	"Robert P. J. Day" <rpjday@...dspring.com>
CC:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: why is it called "asm-generic/atomic.h"?

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ