lkml.org 
[lkml]   [2011]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [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@blackfin.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@gentoo.org>
    -mike
    --
    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/

    \
     
     \ /
      Last update: 2011-05-04 06:47    [W:0.042 / U:215.816 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site