Module: xenomai-2.6 Branch: master Commit: 62901f432fec42af28b9696268bb4d365fc3cad8 URL: http://git.xenomai.org/?p=xenomai-2.6.git;a=commit;h=62901f432fec42af28b9696268bb4d365fc3cad8
Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org> Date: Mon Apr 7 23:39:31 2014 +0200 hal/arm: open code xnarch_atomic_clear_mask for pre-v6 processors. It disappeared from Linux 3.14. --- include/asm-arm/atomic_asm.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/asm-arm/atomic_asm.h b/include/asm-arm/atomic_asm.h index af280b5..bea9ebb 100644 --- a/include/asm-arm/atomic_asm.h +++ b/include/asm-arm/atomic_asm.h @@ -255,14 +255,22 @@ xnarch_atomic_set_mask(unsigned long *addr, unsigned long mask) local_irq_restore_hw(flags); } +static inline void +xnarch_atomic_clear_mask(unsigned long *addr, unsigned long mask) +{ + unsigned long flags; + + local_irq_save_hw(flags); + *addr &= ~mask; + local_irq_restore_hw(flags); +} + #define xnarch_memory_barrier() smp_mb() #define xnarch_atomic_xchg(ptr,x) xchg(ptr,x) #define xnarch_atomic_inc(pcounter) \ atomic_inc((atomic_t *)pcounter) #define xnarch_atomic_dec(pcounter) \ atomic_dec((atomic_t *)pcounter) -#define xnarch_atomic_clear_mask(addr, mask) \ - atomic_clear_mask((mask), (addr)) #define xnarch_atomic_cmpxchg(pcounter, oldval, newval) \ atomic_cmpxchg((atomic_t *)(pcounter), (oldval), (newval)) #define xnarch_atomic_inc_and_test(pcounter) \ _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git