From owner-sc22wg5@open-std.org  Wed Apr 21 22:49:47 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 AEABCC3BA0A; Wed, 21 Apr 2010 22:49:47 +0200 (CET DST)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from mailrelay1.lrz-muenchen.de (mailrelay1.lrz-muenchen.de [129.187.254.106])
	by www2.open-std.org (Postfix) with ESMTP id 1D5F5C178DA
	for <sc22wg5@open-std.org>; Wed, 21 Apr 2010 22:49:45 +0200 (CET DST)
Received: from [129.187.48.222] ([129.187.48.222] [129.187.48.222]) by mailout.lrz-muenchen.de with ESMTP; Wed, 21 Apr 2010 22:49:20 +0200
Message-Id: <4BCF64CF.2080905@lrz.de>
Date: Wed, 21 Apr 2010 22:49:19 +0200
From: Reinhold Bader <Reinhold.Bader@lrz.de>
User-Agent: Thunderbird 2.0.0.24 (Windows/20100228)
MIME-Version: 1.0
To: WG5 <sc22wg5@open-std.org>
Cc: fortran standards email list for J3 <j3@j3-fortran.org>
Subject: Question on locks
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

Hello all,

I have a question on the way locks work. In section 8.5.1 para 3  it  is 
stated that

"All image  control statements except .... LOCK, and UNLOCK include the 
effect of
 executing a SYNC MEMORY statement ..."

Does this not imply that in certain situations it may be necessary to 
explicitly execute a
SYNC MEMORY after successfully acquiring a lock? In particular, is not 
such a statement
required immediately after the statement

LOCK(queue_lock)  ! New segment A starts

in Note 8.45 since otherwise a register-stored value of work_queue_size 
might be used,
overlooking the update of its memory location by a remote image?

Regards
Reinhold
