* [patch 02/15] Generic Mutex Subsystem, add-atomic-xchg-x86_64.patch
@ 2005-12-19 1:34 Ingo Molnar
0 siblings, 0 replies; only message in thread
From: Ingo Molnar @ 2005-12-19 1:34 UTC (permalink / raw)
To: linux-kernel, Linus Torvalds, Andrew Morton
Cc: Arjan van de Ven, Steven Rostedt, Alan Cox, Christoph Hellwig,
Andi Kleen, David Howells, Alexander Viro, Oleg Nesterov,
Paul Jackson
add atomic_cmpxchg() to x86_64. Needed by the new mutex code.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
----
include/asm-x86_64/atomic.h | 1 +
1 files changed, 1 insertion(+)
Index: linux/include/asm-x86_64/atomic.h
===================================================================
--- linux.orig/include/asm-x86_64/atomic.h
+++ linux/include/asm-x86_64/atomic.h
@@ -389,6 +389,7 @@ static __inline__ long atomic64_sub_retu
#define atomic64_dec_return(v) (atomic64_sub_return(1,v))
#define atomic_cmpxchg(v, old, new) ((int)cmpxchg(&((v)->counter), old, new))
+#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
/**
* atomic_add_unless - add unless the number is a given value
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-12-19 1:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-19 1:34 [patch 02/15] Generic Mutex Subsystem, add-atomic-xchg-x86_64.patch Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox