Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030189AbVINWLb (ORCPT ); Wed, 14 Sep 2005 18:11:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965070AbVINWLb (ORCPT ); Wed, 14 Sep 2005 18:11:31 -0400 Received: from scrub.xs4all.nl ([194.109.195.176]:16361 "EHLO scrub.xs4all.nl") by vger.kernel.org with ESMTP id S965061AbVINWLY (ORCPT ); Wed, 14 Sep 2005 18:11:24 -0400 Date: Thu, 15 Sep 2005 00:10:56 +0200 (CEST) From: Roman Zippel X-X-Sender: roman@scrub.home To: Russell King cc: Nick Piggin , Linux Kernel Mailing List , Dipankar Sarma Subject: Re: [PATCH 2/5] atomic: introduce atomic_inc_not_zero In-Reply-To: <20050914230049.F30746@flint.arm.linux.org.uk> Message-ID: References: <43283825.7070309@yahoo.com.au> <4328387E.6050701@yahoo.com.au> <43285374.3020806@yahoo.com.au> <20050914230049.F30746@flint.arm.linux.org.uk> 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 Content-Length: 676 Lines: 23 Hi, On Wed, 14 Sep 2005, Russell King wrote: > > do { > > old = atomic_load_locked(v); > > if (!old) > > break; > > new = old + 1; > > } while (!atomic_store_lock(v, old, new)); > > How do you propose architectures which don't have locked loads implement > this, where the only atomic instruction is an unconditional atomic swap > between memory and CPU register? #define atomic_store_lock atomic_cmpxchg bye, Roman - 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/