X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=include%2Fasm-xtensa%2Fatomic.h;h=5c2672021068670758d9d9d3d4f8ef30abaa5705;hb=9e9dc5f29f2eb65153a15c4fdb12b4382e3a75b2;hp=e2ce06b101ad0096df8894faf7b360be4d66b2ad;hpb=5367f2d67c7d0bf1faae90e6e7b4e2ac3c9b5e0f;p=mv-sheeva.git diff --git a/include/asm-xtensa/atomic.h b/include/asm-xtensa/atomic.h index e2ce06b101a..5c267202106 100644 --- a/include/asm-xtensa/atomic.h +++ b/include/asm-xtensa/atomic.h @@ -13,7 +13,6 @@ #ifndef _XTENSA_ATOMIC_H #define _XTENSA_ATOMIC_H -#include #include typedef struct { volatile int counter; } atomic_t; @@ -224,6 +223,7 @@ static inline int atomic_sub_return(int i, atomic_t * v) #define atomic_add_negative(i,v) (atomic_add_return((i),(v)) < 0) #define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n))) +#define atomic_xchg(v, new) (xchg(&((v)->counter), new)) /** * atomic_add_unless - add unless the number is a given value