From owner-sc22wg5@open-std.org  Fri Jun 17 22:54:41 2011
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 84F85C178E6; Fri, 17 Jun 2011 22:54:41 +0200 (CET DST)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from ppsw-52.csi.cam.ac.uk (ppsw-52.csi.cam.ac.uk [131.111.8.152])
	by www2.open-std.org (Postfix) with ESMTP id CE24FC178DF
	for <sc22wg5@open-std.org>; Fri, 17 Jun 2011 22:54:40 +0200 (CET DST)
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: not scanned
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from hermes-2.csi.cam.ac.uk ([131.111.8.54]:60999)
	by ppsw-52.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.159]:25)
	with esmtpa (EXTERNAL:nmm1) id 1QXg3r-0004sv-FW (Exim 4.72)
	(return-path <nmm1@hermes.cam.ac.uk>); Fri, 17 Jun 2011 21:54:39 +0100
Received: from prayer by hermes-2.csi.cam.ac.uk (hermes.cam.ac.uk)
	with local (PRAYER:nmm1) id 1QXg3r-0001VU-Pv (Exim 4.67)
	(return-path <nmm1@hermes.cam.ac.uk>); Fri, 17 Jun 2011 21:54:39 +0100
Received: from [83.67.89.123] by webmail.hermes.cam.ac.uk
	with HTTP (Prayer-1.3.3); 17 Jun 2011 21:54:39 +0100
Date: 17 Jun 2011 21:54:39 +0100
From: "N.M. Maclaren" <nmm1@cam.ac.uk>
To: sc22wg5 <sc22wg5@open-std.org>
Subject: Re: [ukfortran] (SC22WG5.4480) Added atomic
Message-ID: <Prayer.1.3.3.1106172154390.4554@hermes-2.csi.cam.ac.uk>
In-Reply-To: <20110617160827.0A646C178E6@www2.open-std.org>
References: <20110617160827.0A646C178E6@www2.open-std.org>
X-Mailer: Prayer v1.3.3
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset=ISO-8859-1
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

On Jun 17 2011, Bill Long wrote:
>
>The list of comments on the coarray TR from Rice suggested adding a SWAP 
>atomic subroutine.    The list in 11-200 includes all of the "common" 
>atomic operations except one: atomic andxor. I'm inclined to add that 
>one, which would make SWAP unnecessary. Or we could add both.  For those 
>who are not big amo users...
>
>...
>
>If this is added, is there a need for a separate atomic_swap?

Swapping works reliably and portably when one integer may be negative;
XOR doesn't.

Regards,
Nick.

