1 #ifndef __ASM_SH_CMPXCHG_CAS_H
2 #define __ASM_SH_CMPXCHG_CAS_H
4 static inline unsigned long
5 __cmpxchg_u32(volatile u32
*m
, unsigned long old
, unsigned long new)
7 __asm__
__volatile__("cas.l %1,%0,@r0"
14 static inline unsigned long xchg_u32(volatile u32
*m
, unsigned long val
)
18 while (__cmpxchg_u32(m
, old
, val
) != old
);
22 #include <asm/cmpxchg-xchg.h>
24 #endif /* __ASM_SH_CMPXCHG_CAS_H */