[PATCH] mutex subsystem, add atomic_xchg() to all arches

add atomic_xchg() to all the architectures. Needed by the new mutex code.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
此提交包含在:
Ingo Molnar
2006-01-09 15:59:17 -08:00
提交者 Ingo Molnar
父節點 f17578decc
當前提交 ffbf670f5c
共有 22 個檔案被更改,包括 30 行新增0 行删除

查看文件

@@ -289,6 +289,7 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v)
}
#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