From 4abab5ad6c8465a7528ccdd5f49367da05f78bbd Mon Sep 17 00:00:00 2001 From: Vladimir Azarov Date: Tue, 1 Oct 2024 15:47:05 +0200 Subject: Initial version --- arch/m68k/atomic_arch.h | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 arch/m68k/atomic_arch.h (limited to 'arch/m68k/atomic_arch.h') diff --git a/arch/m68k/atomic_arch.h b/arch/m68k/atomic_arch.h new file mode 100644 index 0000000..b369649 --- /dev/null +++ b/arch/m68k/atomic_arch.h @@ -0,0 +1,8 @@ +#define a_cas a_cas +static inline int a_cas(volatile int *p, int t, int s) +{ + __asm__ __volatile__ ( + "cas.l %0, %2, (%1)" + : "+d"(t) : "a"(p), "d"(s) : "memory", "cc"); + return t; +} -- cgit v1.2.3