diff options
Diffstat (limited to 'include/asm-sparc/atomic.h')
-rw-r--r-- | include/asm-sparc/atomic.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/asm-sparc/atomic.h b/include/asm-sparc/atomic.h index 62bec7ad271c..e1033170bd3a 100644 --- a/include/asm-sparc/atomic.h +++ b/include/asm-sparc/atomic.h @@ -20,6 +20,7 @@ typedef struct { volatile int counter; } atomic_t; extern int __atomic_add_return(int, atomic_t *); extern int atomic_cmpxchg(atomic_t *, int, int); +#define atomic_xchg(v, new) (xchg(&((v)->counter), new)) extern int atomic_add_unless(atomic_t *, int, int); extern void atomic_set(atomic_t *, int); @@ -159,4 +160,5 @@ static inline int __atomic24_sub(int i, atomic24_t *v) #endif /* !(__KERNEL__) */ +#include <asm-generic/atomic.h> #endif /* !(__ARCH_SPARC_ATOMIC__) */ |