[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTiminpyJ_opxhqG0E0gBOrF490b+tQ@mail.gmail.com>
Date: Wed, 4 May 2011 00:44:46 -0400
From: Mike Frysinger <vapier.adi@...il.com>
To: Sven Eckelmann <sven@...fation.org>
Cc: linux-kernel@...r.kernel.org, David Howells <dhowells@...hat.com>,
Chris Metcalf <cmetcalf@...era.com>, x86@...nel.org,
linux-alpha@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
uclinux-dist-devel@...ckfin.uclinux.org,
linux-cris-kernel@...s.com, linux-ia64@...r.kernel.org,
linux-m32r@...linux-m32r.org, linux-m68k@...ts.linux-m68k.org,
linux-mips@...ux-mips.org, linux-am33-list@...hat.com,
linux-parisc@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
linux-s390@...r.kernel.org, linux-sh@...r.kernel.org,
sparclinux@...r.kernel.org, linux-arch@...r.kernel.org
Subject: Re: [PATCH] atomic: add *_dec_not_zero
On Tue, May 3, 2011 at 17:30, Sven Eckelmann wrote:
> Introduce an *_dec_not_zero operation. Make this a special case of
> *_add_unless because batman-adv uses atomic_dec_not_zero in different
> places like re-broadcast queue or aggregation queue management. There
> are other non-final patches which may also want to use this macro.
>
> Cc: uclinux-dist-devel@...ckfin.uclinux.org
>
> --- a/arch/blackfin/include/asm/atomic.h
> +++ b/arch/blackfin/include/asm/atomic.h
> @@ -103,6 +103,7 @@ static inline int atomic_test_mask(int mask, atomic_t *v)
> c != (u); \
> })
> #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
> +#define atomic_dec_not_zero(v) atomic_add_unless((v), -1, 0)
>
> /*
> * atomic_inc_and_test - increment and test
no opinion on the actual idea, but for the Blackfin pieces:
Acked-by: Mike Frysinger <vapier@...too.org>
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists