On Sunday 04 December 2011 21:33:16 Russell King - ARM Linux wrote: [...] > > +#define atomic64_dec_not_zero(v) atomic64_add_unless((v), -1LL, 0LL) > > I think this is rather silly - all these definitions are very similar to > each other. Is there really no way to put this into include/linux/atomic.h, > maybe as something like: > > #ifndef atomic64_dec_not_zero > #define atomic64_dec_not_zero(v) atomic64_add_unless((v), -1, 0) > #endif > > and avoid having to add essentially the same definition to 12 individual > files? > > Architectures which want to override it can do by the following: > > #define atomic64_dec_not_zero atomic64_dec_not_zero > > which won't have any effect on C nor asm code. * https://lkml.org/lkml/2011/5/8/15 * https://lkml.org/lkml/2011/5/8/16 * https://lkml.org/lkml/2011/5/8/321 Kind regards, Sven
Attachment:
signature.asc
Description: This is a digitally signed message part.