Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 25 Jul 2001 19:49:15 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 25 Jul 2001 19:49:04 -0400 Received: from router-100M.swansea.linux.org.uk ([194.168.151.17]:3081 "EHLO the-village.bc.nu") by vger.kernel.org with ESMTP id ; Wed, 25 Jul 2001 19:48:47 -0400 Subject: Re: user-mode port 0.44-2.4.7 To: cfriesen@nortelnetworks.com (Chris Friesen) Date: Thu, 26 Jul 2001 00:49:26 +0100 (BST) Cc: torvalds@transmeta.com (Linus Torvalds), linux-kernel@vger.kernel.org (linux-kernel) In-Reply-To: from "Chris Friesen" at Jul 25, 2001 07:37:20 PM X-Mailer: ELM [version 2.5 PL5] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: From: Alan Cox Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Original-Recipient: rfc822;linux-kernel-outgoing > > This is not a gcc issue. Even if gcc _were_ to generate bad code, the > > global volatile _still_ wouldn't be the correct answer. > > I think his worry is the pedantic reason that without the volatile gcc is > allowed to write code that chokes and dies if xtime happens to change in a > volatile manner. The example given earlier was: Make the volatility explicit where it is needed, either to express a barrier with barrier() or an assignment as in foo = (volatile)xtime This makes it clear where the barriers are and avoids unpleasant optimisation hits elsewhere. Alan - 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/