Date: Fri, 10 Oct 2003 00:45:46 -0700 From: Tim Kientzle <kientzle@acm.org> To: Harti Brandt <brandt@fokus.fraunhofer.de> Cc: freebsd-hackers@freebsd.org Subject: Re: Dynamic reads without locking. Message-ID: <3F8663AA.4010707@acm.org> In-Reply-To: <20031010091003.Q95881@beagle.fokus.fraunhofer.de> References: <20031009194644.50B9116A4BF@hub.freebsd.org> <20031010091003.Q95881@beagle.fokus.fraunhofer.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Harti Brandt wrote: > Yes. When I read the C standard > foo = data & mask; > wouldn't also help, because there is no sequence point in this statement > except at the ;. Before anyone takes this particular line of reasoning seriously, I feel compelled to point out that sequence points have nothing to do with this. a) Sequence points are an "as if" requirement. The program must produce the same results "as if" it strictly obeyed sequence points. It doesn't have to really operate that way. (And, in fact, well-optimized programs running on modern processors rarely do.) b) Sequence points say NOTHING about how multiple threads or processors interact. Sorry, but the C standard doesn't help here. The C standard does not address multi-threading at all. Tim Kientzle
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F8663AA.4010707>