[Top] [All Lists]

Re: [PATCH] atomic: add *_dec_not_zero

To: Sven Eckelmann <>
Subject: Re: [PATCH] atomic: add *_dec_not_zero
From: Mike Frysinger <>
Date: Sun, 8 May 2011 22:38:43 -0400
Cc: Russell King - ARM Linux <>,,,,,,,,,,, Chris Metcalf <>, David Howells <>,,,,,,,
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=mOuq4v7R023AdXjNGMJ4biLjdHg3N+1rr0eqQVDw27c=; b=LhH/RU1r++uhruCrWPjpkFruq6qfOTQ62YDVEVNHUZijEwKgyBZjQHFj8pz7/JSykX RdrsEKS2AiM+gH6+9O/CdczqT4eJDetQuB0zWwB60FreGB0mpukuQtpZ+1r0jpAN90Yj pm/AzprmZxShOMdRafk07SJ6a1KC1lK5M0wbc=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=Ruui1TAcLSmfUpNcK2vttOebS/h7hGv3zMRS9MIEXZrzNVVZcTODO2AxyYHzhR+kJO UeXqBkPV9xaNvwRLwyiBb+C62TRIjUzdPoZ7F3QStK1XnMCe82hf/lERwZgSKfhQ4lmd U4WEw7BYE9LAu6ThJRyhIsGg0F1e33bXZorBQ=
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <>
On Sun, May 8, 2011 at 05:33, Sven Eckelmann wrote:
> Russell King - ARM Linux wrote:
> [...]
>> Do we need atomic_dec_not_zero() in every arch header - is there no
>> generic header which it could be added to?
> Mike Frysinger already tried to answer it in
> <>:
>> that's what asm-generic is for.  if the arch isnt using it, it's
>> either because the arch needs to convert to it, or they're using SMP
>> and asm-generic doesnt yet support that for atomic.h.
>> for example, the Blackfin port only needed updating for the SMP case.
>> in the non-SMP case, we're getting the def from asm-generic/atomic.h.
> Feel free to change that but I just followed the style used by all other
> macros and will not redesign the complete atomic*.h idea.

what you're doing is currently correct.  i think merging SMP support
into asm-generic for atomic* will take a bit of pondering first.

<Prev in Thread] Current Thread [Next in Thread>