1 #ifndef _ASM_MICROBLAZE_ATOMIC_H
2 #define _ASM_MICROBLAZE_ATOMIC_H
4 #include <asm/cmpxchg.h>
5 #include <asm-generic/atomic.h>
6 #include <asm-generic/atomic64.h>
9 * Atomically test *v and decrement if it is greater than 0.
10 * The function returns the old value of *v minus 1.
12 static inline int atomic_dec_if_positive(atomic_t *v)
17 local_irq_save(flags);
21 local_irq_restore(flags);
25 #define atomic_dec_if_positive atomic_dec_if_positive
27 #endif /* _ASM_MICROBLAZE_ATOMIC_H */