From ffbf670f5cd50501a34a5187981460da2216071e Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Mon, 9 Jan 2006 15:59:17 -0800 Subject: [PATCH] mutex subsystem, add atomic_xchg() to all arches add atomic_xchg() to all the architectures. Needed by the new mutex code. Signed-off-by: Ingo Molnar Signed-off-by: Arjan van de Ven --- include/asm-sparc/atomic.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/asm-sparc/atomic.h') diff --git a/include/asm-sparc/atomic.h b/include/asm-sparc/atomic.h index accb4967e9d2..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); -- cgit v1.2.1