Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757314AbXEIN2Y (ORCPT ); Wed, 9 May 2007 09:28:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754297AbXEIN2Q (ORCPT ); Wed, 9 May 2007 09:28:16 -0400 Received: from outpipe-village-512-1.bc.nu ([81.2.110.250]:48373 "EHLO the-village.bc.nu" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1754114AbXEIN2P (ORCPT ); Wed, 9 May 2007 09:28:15 -0400 Date: Wed, 9 May 2007 14:31:51 +0100 From: Alan Cox To: Nick Piggin Cc: David Rientjes , Randy Dunlap , Satyam Sharma , Andrew Morton , Paul Sokolovsky , linux-kernel@vger.kernel.org, jeremy@goop.org Subject: Re: [PATCH] doc: volatile considered evil Message-ID: <20070509143151.6f0731fe@the-village.bc.nu> In-Reply-To: <464193DB.70205@yahoo.com.au> References: <516386418.20070501080839@gmail.com> <20070430235642.e576e917.akpm@linux-foundation.org> <20070508121404.17bd97a6.randy.dunlap@oracle.com> <20070508163452.8b71f682.randy.dunlap@oracle.com> <20070508190800.1334b968.randy.dunlap@oracle.com> <20070509102134.5d722386@the-village.bc.nu> <464193DB.70205@yahoo.com.au> X-Mailer: Claws Mail 2.9.1 (GTK+ 2.10.8; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 768 Lines: 16 > > When you are implementing the locking primitives on a new platform. When > > you are implementing the I/O and atomic prmitives on a new platform. Also > > in inline gcc assembler where "volatile" is used for subtly different > > purposes. > > Is there a good reason for using volatile in atomic/locking primitives? > AFAIKS there is not. Depends on the platform. If you are writing a new architecture then who knows what you will need to get the barriers right - you may want to use volatile, you may want to use asm. - 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/