All of lore.kernel.org
 help / color / mirror / Atom feed
* memory barriers on sparc
@ 2010-01-25 18:53 Chris Friesen
  2010-01-25 21:27 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Friesen @ 2010-01-25 18:53 UTC (permalink / raw)
  To: sparclinux


Someone asked a question on comp.programming.threads about memory
barriers, which led me to the discovery that glibc and the kernel use
different semantics for memory barriers on sparc64 (and maybe sparc too,
didn't check).

The kernel uses:

read : LoadLoad
write : StoreStore

This matches my understanding of the behaviour of other architectures as
well.  I got confused when I saw that glibc (as of 2.8 at least) uses:

read: LoadLoad | LoadStore
write: StoreLoad | StoreStore

I'm curious about the difference.  Could someone explain why glibc uses
additional restrictions and the kernel doesn't?

Thanks,

Chris


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

end of thread, other threads:[~2010-01-25 21:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-25 18:53 memory barriers on sparc Chris Friesen
2010-01-25 21:27 ` David Miller

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.