Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 12 Aug 2002 07:14:40 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 12 Aug 2002 07:14:40 -0400 Received: from dell-paw-3.cambridge.redhat.com ([195.224.55.237]:26363 "EHLO passion.cambridge.redhat.com") by vger.kernel.org with ESMTP id ; Mon, 12 Aug 2002 07:14:40 -0400 X-Mailer: exmh version 2.5 13/07/2001 with nmh-1.0.4 From: David Woodhouse X-Accept-Language: en_GB In-Reply-To: <1028850350.28882.121.camel@irongate.swansea.linux.org.uk> References: <1028850350.28882.121.camel@irongate.swansea.linux.org.uk> <1028844681.1669.80.camel@ldb> To: Alan Cox Cc: Luca Barbieri , Roman Zippel , Linux-Kernel ML Subject: Re: [PATCH] [2.5] asm-generic/atomic.h and changes to arm, parisc, mips, m68k, sh, cris to use it Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 12 Aug 2002 12:16:48 +0100 Message-ID: <20995.1029151008@redhat.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 584 Lines: 20 alan@lxorguk.ukuu.org.uk said: > Possibly not - volatile doesnt guarantee the compiler won't do > x = 1 > add *p into x > store x into *p Er, AIUI 'volatile' guarantees that '*p++' will do precisely that. It's a load, an add and a store, and the rules about volatile mean that the load and the store _must_ be separate. -- dwmw2 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/