Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761874AbYCCRsc (ORCPT ); Mon, 3 Mar 2008 12:48:32 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755908AbYCCRsN (ORCPT ); Mon, 3 Mar 2008 12:48:13 -0500 Received: from outpipe-village-512-1.bc.nu ([81.2.110.250]:59933 "EHLO lxorguk.ukuu.org.uk" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1755273AbYCCRsM (ORCPT ); Mon, 3 Mar 2008 12:48:12 -0500 Date: Mon, 3 Mar 2008 17:33:40 +0000 From: Alan Cox To: Nick Piggin Cc: Alan Stern , Pavel Machek , "Paul E. McKenney" , Linus Torvalds , Andrew Morton , Zdenek Kabelac , davem@davemloft.net, "Rafael J. Wysocki" , Pierre Ossman , Kernel development list , pm list Subject: Re: [patch] Re: using long instead of atomic_t when only set/read is required Message-ID: <20080303173340.55a38c6b@core> In-Reply-To: <200803040416.33937.nickpiggin@yahoo.com.au> References: <20080303120842.GA28369@elf.ucw.cz> <20080303155330.39e45ad4@core> <200803040416.33937.nickpiggin@yahoo.com.au> X-Mailer: Claws Mail 3.2.0 (GTK+ 2.12.5; x86_64-redhat-linux-gnu) Organization: Red Hat UK Cyf., Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, Y Deyrnas Gyfunol. Cofrestrwyd yng Nghymru a Lloegr o'r rhif cofrestru 3798903 Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 681 Lines: 18 > Are you sure gcc doesn't? Or is it just "C"? gcc doesn't > Linux wouldn't work today if gcc did something non-atomic there > (presuming you're talking about naturally aligned pointers/ints). > It is widely used and accepted. Yes and we've had tty layer traces in the past clearly showing it isn't always safe, especially if any math is involved anywhere near the assignment. That may be why pointer flipping happens to work. 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/