From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750790AbWGFT6o (ORCPT ); Thu, 6 Jul 2006 15:58:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750797AbWGFT6n (ORCPT ); Thu, 6 Jul 2006 15:58:43 -0400 Received: from smtp.osdl.org ([65.172.181.4]:27372 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S1750790AbWGFT6n (ORCPT ); Thu, 6 Jul 2006 15:58:43 -0400 Date: Thu, 6 Jul 2006 12:58:21 -0700 (PDT) From: Linus Torvalds To: Chris Friesen cc: Mark Lord , Arjan van de Ven , "linux-os (Dick Johnson)" , Ingo Molnar , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [patch] spinlocks: remove 'volatile' In-Reply-To: <44AD658A.5070005@nortel.com> Message-ID: References: <20060705114630.GA3134@elte.hu> <20060705101059.66a762bf.akpm@osdl.org> <20060705193551.GA13070@elte.hu> <20060705131824.52fa20ec.akpm@osdl.org> <20060705204727.GA16615@elte.hu> <20060705214502.GA27597@elte.hu> <20060706081639.GA24179@elte.hu> <1152187268.3084.29.camel@laptopd505.fenrus.org> <44AD5357.4000100@rtr.ca> <44AD658A.5070005@nortel.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 6 Jul 2006, Chris Friesen wrote: > > The C standard requires the use of volatile for signal handlers and setjmp. Actually, the C standard requires "sigatomic_t". > For userspace at least the whole discussion of "barriers" is sort of > moot--there are no memory barriers defined in the C language, which makes it > kind of hard to write portable code that uses them. Any locking primitive BY DEFINITION has a barrier in it. If it doesn't, it's not a locking primitive, it's a random sequence of code that does something pointless. Linus