All of lore.kernel.org
 help / color / mirror / Atom feed
* Inconsistent "#ifdef __KERNEL__" on different architectures
@ 2001-05-27 17:25 Adrian Bunk
  2001-05-27 17:29 ` Alan Cox
  2001-05-27 19:16 ` Abramo Bagnara
  0 siblings, 2 replies; 12+ messages in thread
From: Adrian Bunk @ 2001-05-27 17:25 UTC (permalink / raw)
  To: linux-kernel

Hi,

while looking for the reason of a build failure of the ALSA libraries on
ARM [1] I discovered the following strange thing:

On some architectures a function is inside an "#ifdef __KERNEL__" in the
header file and on others not. Is there a reason for this or is this
inconsistency simply a bug?

In this case the following functions are affected (in 2.4.5):

atomic_read, atomic_inc and atomic_dec in include/asm-*/atomic.h

"#ifdef __KERNEL__" only on arm, mips, mips64 and sparc (but not on
                                                         sparc64)


rmb and wmb in include/asm-*/system.h

"#ifdef __KERNEL__" only on arm and sparc (but not on sparc64)

not defined on parisc although used to define smp_rmb on SMP systems:
<--  snip  -->
#ifdef CONFIG_SMP
#define smp_mb()        mb()
#define smp_rmb()       rmb()
#define smp_wmb()       wmb()
#else
<--  snip  -->


cu
Adrian

[1] http://bugs.debian.org/97988


-- 
A "No" uttered from deepest conviction is better and greater than a
"Yes" merely uttered to please, or what is worse, to avoid trouble.
                -- Mahatma Ghandi


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2001-06-06  6:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-27 17:25 Inconsistent "#ifdef __KERNEL__" on different architectures Adrian Bunk
2001-05-27 17:29 ` Alan Cox
2001-05-27 19:16 ` Abramo Bagnara
2001-05-27 21:07   ` Adrian Bunk
2001-05-27 21:42     ` Russell King - ARM Linux
2001-05-27 22:10     ` Philip Blundell
2001-05-29 22:30       ` Ralf Baechle
2001-06-02 20:29         ` Adrian Bunk
2001-06-05  4:09           ` Paul Mackerras
2001-06-05  9:33             ` Adrian Bunk
2001-06-05 12:15               ` Paul Mackerras
2001-06-06  6:51             ` Albert D. Cahalan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.