public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* What does atomic_read actually do?
@ 2004-12-18 16:23 Joseph Seigh
  2004-12-18 17:11 ` Paolo Ornati
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Joseph Seigh @ 2004-12-18 16:23 UTC (permalink / raw)
  To: linux-kernel

It doesn't do anything that would actually guarantee that the fetch from
memory would be atomic as far as I can see, at least in the x86 version.
The C standard has nothing to say about atomicity w.r.t. multithreading or
multiprocessing.  Is this a gcc compiler thing?  If so, does gcc guarantee
that it will fetch aligned ints with a single instruction on all platforms
or just x86?   And what's with volatile since if the C standard implies
nothing about multithreading then it follows that volatile has no meaning
with respect to multithreading either?  Also a gcc thing?  Are volatile
semantics well defined enough that you can use it to make the compiler
synchronize memory state as far as it is concerned?

Joe Seigh


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

end of thread, other threads:[~2004-12-20 20:46 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-18 16:23 What does atomic_read actually do? Joseph Seigh
2004-12-18 17:11 ` Paolo Ornati
2004-12-18 18:14   ` Joseph Seigh
2004-12-18 18:34 ` Arjan van de Ven
2004-12-18 19:20   ` Joseph Seigh
2004-12-18 19:39     ` Joe Korty
2004-12-18 19:54     ` Arjan van de Ven
2004-12-18 20:43       ` Joseph Seigh
2004-12-18 21:03         ` Brian Gerst
2004-12-19 22:21         ` Robert Love
2004-12-19 23:50           ` Joseph Seigh
2004-12-20 11:51             ` Arjan van de Ven
2004-12-20 12:52             ` Andrea Arcangeli
2004-12-20 20:51               ` Joseph Seigh
2004-12-18 20:47 ` Brian Gerst

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