From owner-sc22wg5@open-std.org  Thu Apr 22 00:49:09 2010
Return-Path: <owner-sc22wg5@open-std.org>
X-Original-To: sc22wg5-dom8
Delivered-To: sc22wg5-dom8@www2.open-std.org
Received: by www2.open-std.org (Postfix, from userid 521)
	id 4A8BFC4E9FA; Thu, 22 Apr 2010 00:49:09 +0200 (CET DST)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from ironport2.lbl.gov (ironport2.lbl.gov [128.3.41.14])
	by www2.open-std.org (Postfix) with ESMTP id 1BC9AC3BA26
	for <sc22wg5@open-std.org>; Thu, 22 Apr 2010 00:49:06 +0200 (CET DST)
X-Ironport-SBRS: None
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: ApsEAEIdz0uAAwU8/2dsb2JhbACdDL4cAoJyghoEgzQ
X-IronPort-AV: E=Sophos;i="4.52,252,1270450800"; 
   d="scan'208";a="108940432"
Received: from angilas.lbl.gov (HELO angilas.localnet) ([128.3.5.60])
  by ironport2.lbl.gov with ESMTP/TLS/DHE-RSA-AES256-SHA; 21 Apr 2010 15:49:04 -0700
From: Aleksandar Donev <adonev@lbl.gov>
Organization: LBL
To: WG5 <sc22wg5@open-std.org>
Subject: Re: (j3.2006) (SC22WG5.4255) [ukfortran]  Question on locks
Date: Wed, 21 Apr 2010 15:49:04 -0700
User-Agent: KMail/1.11.2 (Linux/2.6.28-17-generic; KDE/4.2.2; x86_64; ; )
References: <20100421204947.D8CC7C178DA@www2.open-std.org> <20100421211846.2761BC4E9FA@www2.open-std.org> <20100421221958.90A94C4E9FA@www2.open-std.org>
In-Reply-To: <20100421221958.90A94C4E9FA@www2.open-std.org>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <201004211549.04174.adonev@lbl.gov>
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

On Wednesday 21 April 2010, N.M. Maclaren wrote:

> What locks don't provide is
> a barrier - i.e. a polint at which two images synchronise, and
> everything before is before, and everything after is after.  They
> provide a one-way ordering.
OK, Nick triggered my memory. He is right. The reason we took the 
"implied sync memory" is that locks provide one-way ordering, and allow 
for code-movement (i.e., reading register values or preloading etc.) in 
one direction, but not the other. This was specifically requested by 
some optimization people (from the C++ committee) and semantically much 
better anyway.

So the answer to your question is "no, sync memory is not required in 
Note 8.44." As Nick mentioned, Note 8.40 uses atomics and it does 
require the sync memories.

Aleks

-- 
Aleksandar Donev, Ph.D.
Luis W. Alvarez Postdoctoral Fellow
Center for Computational Sciences and Engineering (https://ccse.lbl.gov)
Lawrence Berkeley National Laboratory (http://www.lbl.gov)
E-mail: adonev@lbl.gov
Phone: (510) 486-5782  Fax: (510) 486-6900
Address: MS 50A-1148, LBL, 1 Cyclotron Rd., Berkeley, CA 94720
Web: http://cims.nyu.edu/~donev/

