Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Alexander Terekhov Newsgroups: comp.programming.threads Subject: Re: C++0x, 29.3 p13 "[...] atomic stores visible [...] within a reasonable amount of time." Date: Sat, 02 Jul 2011 10:18:20 +0200 Organization: Aioe.org NNTP Server Lines: 27 Message-ID: <4E0ED44C.9E730069@web.de> References: <3c50710c-c220-4697-91a7-49b6dc304782@r33g2000prh.googlegroups.com> <4E08D22D.7EB751FB@web.de> <9eceabc4-b9fb-49e3-a917-6986ee00a33e@d26g2000prn.googlegroups.com> <4E0DE92A.78E11929@web.de> Reply-To: terekhov@web.de NNTP-Posting-Host: dqZXNyPjj+0O0FgbzeTf0g.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en X-Notice: Filtered by postfilter v. 0.8.2 Xref: x330-a1.tempe.blueboxinc.net comp.programming.threads:379 Joshua Maurice wrote: [...] > > OTOH seqcst read may yield 'old' value for "a reasonable amount of time" > > just like relaxed read. > > Is this true? I'm not disputing it. However, I don't think this is See http://www.cl.cam.ac.uk/~pes20/cpp/cpp0xmappings.html "Load Seq_Cst: MOV (from memory)" > quite correct. I think I could use 29.3 p4 to maybe show otherwise. We > know that there is a total order S on all seqcst operations. I am > presuming that this has some semblance to the time at which a core > actually executes it - which may be our point of contention. I would > think an implementation would need to be malicious to start doing this > and to preserve the guarantees of 29.3 p4 through p7. I'd have to > think more about this, but suffice to say I also prefer the simple > guaranteed things over the of the fuzzy "maybe in practice" things. People won't be happy with XADD(0) for seqcst reads. regards, alexander.