From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030407AbWGHVn5 (ORCPT ); Sat, 8 Jul 2006 17:43:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030408AbWGHVn5 (ORCPT ); Sat, 8 Jul 2006 17:43:57 -0400 Received: from smtp.osdl.org ([65.172.181.4]:50322 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S1030407AbWGHVn4 (ORCPT ); Sat, 8 Jul 2006 17:43:56 -0400 Date: Sat, 8 Jul 2006 14:43:34 -0700 (PDT) From: Linus Torvalds To: Pavel Machek cc: "linux-os (Dick Johnson)" , Krzysztof Halasa , Ingo Molnar , Andrew Morton , Linux kernel , arjan@infradead.org Subject: Re: [patch] spinlocks: remove 'volatile' In-Reply-To: <20060708204925.GA5440@elf.ucw.cz> Message-ID: References: <20060708204925.GA5440@elf.ucw.cz> 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 Sat, 8 Jul 2006, Pavel Machek wrote: > > Actually, because volatile is big hammer, it can be used to work > around compiler bugs. If compiler dies at internal error in function > foo, just sprinkle few volatiles into it, and you can usually work > around that compiler problem. Heh. That's probably an even better use of "volatile" than using it for hiding bugs in the sources. The bugs in the sources you'd be better off just _fixing_, while the compiler problems you may have a much harder time working around.. Linus