Module: xenomai-forge
Branch: master
Commit: 6aab95713acb8740ba49743d84a872fe4ec40f48
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=6aab95713acb8740ba49743d84a872fe4ec40f48

Author: Philippe Gerum <r...@xenomai.org>
Date:   Tue Dec  4 19:16:32 2012 +0100

cobalt/blackfin: pull generic support for atomic ops

---

 include/asm-blackfin/atomic.h |   20 +-------------------
 1 files changed, 1 insertions(+), 19 deletions(-)

diff --git a/include/asm-blackfin/atomic.h b/include/asm-blackfin/atomic.h
index 421c338..d9cba02 100644
--- a/include/asm-blackfin/atomic.h
+++ b/include/asm-blackfin/atomic.h
@@ -22,21 +22,7 @@
 
 #ifdef __KERNEL__
 
-#include <linux/version.h>
-#include <linux/bitops.h>
-#include <asm/atomic.h>
-
-#define xnarch_atomic_xchg(ptr,v)      xchg(ptr,v)
-#define xnarch_memory_barrier()                smp_mb()
-#define xnarch_read_memory_barrier()   rmb()
-#define xnarch_write_memory_barrier()  wmb()
-
-#define xnarch_atomic_set(pcounter,i)           atomic_set(pcounter,i)
-#define xnarch_atomic_get(pcounter)             atomic_read(pcounter)
-#define xnarch_atomic_inc(pcounter)             atomic_inc(pcounter)
-#define xnarch_atomic_dec(pcounter)             atomic_dec(pcounter)
-#define xnarch_atomic_inc_and_test(pcounter)    atomic_inc_and_test(pcounter)
-#define xnarch_atomic_dec_and_test(pcounter)    atomic_dec_and_test(pcounter)
+#include <asm/xenomai/hal.h>
 
 #define xnarch_atomic_set_mask(pflags, mask)   \
        rthal_atomic_set_mask((pflags), (mask))
@@ -44,10 +30,6 @@
 #define xnarch_atomic_clear_mask(pflags, mask)                 \
        rthal_atomic_clear_mask((pflags), (mask))
 
-#else /* !__KERNEL__ */
-
-#define xnarch_memory_barrier()     __asm__ __volatile__("": : :"memory")
-
 #endif /* __KERNEL__ */
 
 #include <asm-generic/xenomai/atomic.h>


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to