Re: [PATCH] atomic: add *_dec_not_zero
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: David Laight <David.Laight@xxxxxxxxxx>
- Subject: Re: [PATCH] atomic: add *_dec_not_zero
- From: Mike Frysinger <vapier.adi@xxxxxxxxx>
- Date: Wed, 4 May 2011 04:33:24 -0400
- Cc: Sven Eckelmann <sven@xxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxx, linux-m32r@xxxxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-parisc@xxxxxxxxxxxxxxx, linux-cris-kernel@xxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, Chris Metcalf <cmetcalf@xxxxxxxxxx>, David Howells <dhowells@xxxxxxxxxx>, linux-m68k@xxxxxxxxxxxxxxx, linux-am33-list@xxxxxxxxxx, linux-alpha@xxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, uclinux-dist-devel@xxxxxxxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
- In-reply-to: <AE90C24D6B3A694183C094C60CF0A2F6D8AD0D@xxxxxxxxxxxxxxxxxx>
- List-id: <linux-ia64.vger.kernel.org>
- References: <1304458235-28473-1-git-send-email-sven@xxxxxxxxxxxxx> <AE90C24D6B3A694183C094C60CF0A2F6D8AD0D@xxxxxxxxxxxxxxxxxx>
On Wed, May 4, 2011 at 04:05, David Laight 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.
>
> Isn't there a place where a default definition of this can be
> defined? Instead of adding it separately to every architecture.
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.
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]