Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Alexander Terekhov Newsgroups: comp.programming.threads Subject: Re: C++0x, 29.3 p13 "[...] atomic stores visible [...] within a reasonableamount of time." Date: Tue, 05 Jul 2011 10:12:29 +0200 Organization: A noiseless patient Spider Lines: 38 Message-ID: <4E12C76D.14571224@web.de> References: <3c50710c-c220-4697-91a7-49b6dc304782@r33g2000prh.googlegroups.com> <4E08D22D.7EB751FB@web.de> <9eceabc4-b9fb-49e3-a917-6986ee00a33e@d26g2000prn.googlegroups.com> Reply-To: terekhov@web.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: mx04.eternal-september.org; posting-host="MCbSEzW5qwGLFMNXJh39IQ"; logging-data="1551"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18I67ycwOkwwNgN94xjLpqCV+tslxShJIE=" X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en Cancel-Lock: sha1:RA+RTBnwU0bS78AQiaukHyWxyfE= Xref: x330-a1.tempe.blueboxinc.net comp.programming.threads:383 Edek wrote: > > >> C++11 aside (the latest draft is not public and I have no idea what it > >> says), > > > > C++0x, 29.3 p13. In draft n3242, the exact text is: > > "Implementations should make atomic stores visible to atomic loads > > within a reasonable amount of time." > > > > If you have the time, this point somehow interests me a lot. > > To start: does it apply to relaxed only? It applies to all stores. > > The main question: Does it apply to release Yes. > (and acquire/consume)? There are no acquire/consume stores. > (I am ignoring other orderings on purpose, as irrelevant for > release/acquire, or consume, pair) > > What I am basically wondering about, is how to release a lock > (or anything else blocking another thread) > in a way that assures it is done 'now' [1]; I care more Simply do a store or RMW. The lock acquiring thread will perform an RMW attempting to acquire the lock. regards, alexander.