public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* memory_barrier
@ 2005-04-09 18:34 Bart De Schuymer
  2005-04-09 19:28 ` memory_barrier Roland Dreier
  0 siblings, 1 reply; 2+ messages in thread
From: Bart De Schuymer @ 2005-04-09 18:34 UTC (permalink / raw)
  To: linux-kernel

Hi,

Is there any reason why __memory_barrier() is still referenced in the
kernel source?

grep -r memory_barrier gave the following back, which at first seems to
suggest barrier() is defined using some phantom __memory_barrier(),
quite deceiving...


include/linux/compiler-intel.h:#define barrier() __memory_barrier()
include/linux/compiler.h:# define barrier() __memory_barrier()
include/asm-m32r/system.h: * memory_barrier() for examples and URLs to more information.
include/asm-m32r/system.h: *      memory_barrier();
include/asm-m32r/system.h: *      memory_barrier();
include/asm-i386/system.h: * memory_barrier() for examples and URLs to more information.
include/asm-i386/system.h: *    memory_barrier();
include/asm-i386/system.h: *    memory_barrier();
include/asm-mips/system.h: * memory_barrier() for examples and URLs to more information.
include/asm-mips/system.h: *    memory_barrier();
include/asm-mips/system.h: *    memory_barrier();
include/asm-ia64/intel_intrin.h:void __memory_barrier(void);
include/asm-ia64/intel_intrin.h:#define ia64_barrier()          __memory_barrier()


cheers,
Bart



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

* Re: memory_barrier
  2005-04-09 18:34 memory_barrier Bart De Schuymer
@ 2005-04-09 19:28 ` Roland Dreier
  0 siblings, 0 replies; 2+ messages in thread
From: Roland Dreier @ 2005-04-09 19:28 UTC (permalink / raw)
  To: Bart De Schuymer; +Cc: linux-kernel

    Bart> Hi, Is there any reason why __memory_barrier() is still
    Bart> referenced in the kernel source?

    Bart> grep -r memory_barrier gave the following back, which at
    Bart> first seems to suggest barrier() is defined using some
    Bart> phantom __memory_barrier(), quite deceiving...

Notice that it's used in <linux/compiler-intel.h> -- the Intel
compiler has an intrinsic called __memory_barrier().  So the
definition of barrier() using this intrinsic is entirely correct and
appropriate.

 - R.

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

end of thread, other threads:[~2005-04-09 20:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-09 18:34 memory_barrier Bart De Schuymer
2005-04-09 19:28 ` memory_barrier Roland Dreier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox