From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from pentafluge.infradead.org ([213.146.154.40]:34164 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754235AbXIJNxI convert rfc822-to-8bit (ORCPT ); Mon, 10 Sep 2007 09:53:08 -0400 Date: Mon, 10 Sep 2007 15:51:56 +0100 From: Arjan van de Ven Subject: Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures Message-ID: <20070910155156.2c1453fc@laptopd505.fenrus.org> In-Reply-To: <200709101156.30010.vda.linux@googlemail.com> References: <18115.52863.638655.658466@cargo.ozlabs.ibm.com> <200709091902.55388.vda.linux@googlemail.com> <20070909191839.1fa10e88@laptopd505.fenrus.org> <200709101156.30010.vda.linux@googlemail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-arch-owner@vger.kernel.org To: Denys Vlasenko Cc: Linus Torvalds , Nick Piggin , Satyam Sharma , Herbert Xu , Paul Mackerras , Christoph Lameter , Chris Snook , Ilpo Jarvinen , "Paul E. McKenney" , Stefan Richter , Linux Kernel Mailing List , linux-arch@vger.kernel.org, Netdev , Andrew Morton , ak@suse.de, heiko.carstens@de.ibm.com, David Miller , schwidefsky@de.ibm.com, wensong@linux-vs.org, horms@verge.net.au, wjiang@resilience.com, cfriesen@nortel.com, zlynx@acm.org, rpjday@mindspring.com, jesper.juhl@gmail.com, segher@kernel.crashing.org List-ID: On Mon, 10 Sep 2007 11:56:29 +0100 Denys Vlasenko wrote: > > Well, if you insist on having it again: > > Waiting for atomic value to be zero: > >         while (atomic_read(&x)) >                 continue; > and this I would say is buggy code all the way. Not from a pure C level semantics, but from a "busy waiting is buggy" semantics level and a "I'm inventing my own locking" semantics level.