X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=include%2Fasm-sparc%2Fatomic.h;h=e1033170bd3ad89dcb473f76ebd9f636641cb57a;hb=4e9a4b71f1eb23f35c394eb2b388dbe0389d316a;hp=accb4967e9d2a82b5f5c8e49edf59894f742b496;hpb=123656d4cc8c946f578ebd18c2050f5251720428;p=powerpc.git diff --git a/include/asm-sparc/atomic.h b/include/asm-sparc/atomic.h index accb4967e9..e1033170bd 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);