From -5743140567707402679
X-Google-Thread: f78e5,edf2eb1d3f0f9755
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news1.google.com!news2.google.com!proxad.net!proxad.net!213.253.16.105.MISMATCH!mephistopheles.news.clara.net!news.clara.net!wagner.news.clara.net!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull
From: terekhov@web.de (Alexander Terekhov)
Newsgroups: comp.std.c++
Subject: Re: Multithreaded programming: is the C++ standardization 
 committeelistening?
Date: Mon, 23 Aug 2004 15:58:15 GMT
Lines: 23
Sender: mail2news@demon.net
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <4129E129.380B0960@web.de>
References: <2ofbepFa2tpoU1@uni-berlin.de> <6uh6i0tbr0j0urbnocg5t9ucb5gfpr8gr3@4ax.com> <2ohmmiFavqsiU1@uni-berlin.de> <4123BD01.BCF1DC67@web.de> <2oig7mFb30cmU1@uni-berlin.de> <cg33nf$k48$1@news.cistron.nl> <2okpccFbrqqkU1@uni-berlin.de> <abefd130.0408201501.7b3093e8@posting.google.com> <2ongt9Fcr7pgU1@uni-berlin.de> <4127A8E3.2A99331F@web.de> <cg8l72$pt3$1@news.astound.net>
NNTP-Posting-Host: news.news.demon.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.demon.co.uk 1093276698 12056 158.152.254.254 (23 Aug 2004 15:58:18 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Mon, 23 Aug 2004 15:58:18 +0000 (UTC)
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Spam-Checker-Version: SpamAssassin 2.64-mulga_r1 (2004-01-11) on 
	mulga.cs.mu.OZ.AU
X-Orig-X-Trace: news.uni-berlin.de IwoG+uN+jOEhgYf7ZIMrfgF3CpX+h8FX3W7j2/gk1wLVL8Bf5c
X-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham 
	version=2.64-mulga_r1
X-Accept-Language: en
X-Reply-To: terekhov@web.de
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id i7NFwFbX006397;
	Tue, 24 Aug 2004 01:58:15 +1000 (EST)
X-Path: comp-std-cpp-robomod!not-for-mail
X-Spam-Level: 
X-Delivered-To: std-c++@ucar.edu
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Newsgroups: comp.std.c++
Xref: g2news1.google.com comp.std.c++:2057


"David B. Held" wrote:
> 
> Alexander Terekhov wrote:
> > [...]
> > Why would you need some barrier on increment?
> 
> Thread 1 loads count from memory and increments it.  It gets written to
> cache but not to memory [yet].  Thread 2, on a different processor,
> loads the same count from memory and increments it.  They each write the
> same value to memory.  Are you saying this won't happen, and why?

Because each write is done using CAS or LL(LR)/SC.

regards,
alexander.

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



