Christopher Smith wrote:
Pointer assignment *isn't* guaranteed to be atomic by
the language and even if it is the code presented should produce the
exact same code for assignment with any decent compiler.

I think the point was that the check for nullness and the following of the indirection isn't atomic. Not that two people might assign at the same time, but that you might get

if (p != null)
      <zap> set p null </zap>
return *p;

--
  Darren New / San Diego, CA, USA (PST)
    His kernel fu is strong.
    He studied at the Shao Linux Temple.

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to