diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-09 17:31:38 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-09 17:31:38 -0800 |
commit | 80c0531514516e43ae118ddf38424e06e5c3cb3c (patch) | |
tree | 2eef8cf8fdf505b18f83078d1eb41167e98f5b54 /include/asm-xtensa | |
parent | a457aa6c2bdd743bbbffd3f9e4fdbd8c71f8af1b (diff) | |
parent | 11b751ae8c8ca3fa24c85bd5a3e51dd9f95cda17 (diff) | |
download | op-kernel-dev-80c0531514516e43ae118ddf38424e06e5c3cb3c.zip op-kernel-dev-80c0531514516e43ae118ddf38424e06e5c3cb3c.tar.gz |
Merge master.kernel.org:/pub/scm/linux/kernel/git/mingo/mutex-2.6
Diffstat (limited to 'include/asm-xtensa')
-rw-r--r-- | include/asm-xtensa/atomic.h | 1 | ||||
-rw-r--r-- | include/asm-xtensa/mutex.h | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/asm-xtensa/atomic.h b/include/asm-xtensa/atomic.h index e2ce06b..fe105a1 100644 --- a/include/asm-xtensa/atomic.h +++ b/include/asm-xtensa/atomic.h @@ -224,6 +224,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 diff --git a/include/asm-xtensa/mutex.h b/include/asm-xtensa/mutex.h new file mode 100644 index 0000000..458c1f7 --- /dev/null +++ b/include/asm-xtensa/mutex.h @@ -0,0 +1,9 @@ +/* + * Pull in the generic implementation for the mutex fastpath. + * + * TODO: implement optimized primitives instead, or leave the generic + * implementation in place, or pick the atomic_xchg() based generic + * implementation. (see asm-generic/mutex-xchg.h for details) + */ + +#include <asm-generic/mutex-dec.h> |