Re: [patch 2/8] mutex subsystem, add atomic_cmpxchg() to all arches
From: Ingo Oeser
Date: Wed Dec 21 2005 - 16:54:16 EST
On Wednesday 21 December 2005 16:54, Ingo Molnar wrote:
> add atomic_cmpxchg() to all the architectures. Needed by the new mutex code.
You add atomic_xchg(), since the above exists already.
Please fixup your patch description!
> Index: linux/include/asm-alpha/atomic.h
> ===================================================================
> --- linux.orig/include/asm-alpha/atomic.h
> +++ linux/include/asm-alpha/atomic.h
> @@ -176,6 +176,7 @@ static __inline__ long atomic64_sub_retu
> }
>
> #define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n)))
> +#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
^^^^^^^^^^^^^^^^^^^^^^ see?
Regards
Ingo Oeser
Attachment:
pgp00000.pgp
Description: PGP signature