From c7c69094e5ce66ed7a2b5d05420a7d1c01e3d6c4 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 26 May 2009 09:52:59 +0100 Subject: PV-on-HVM: Define atomic_cmpxchg() for old Linux kernels. Signed-off-by: KUWAMURA Shin'ya --- unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'unmodified_drivers') diff --git a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h index eceac2a4ff..fd696704ee 100644 --- a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h +++ b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h @@ -157,4 +157,8 @@ typedef irqreturn_t (*irq_handler_t)(int, void *, struct pt_regs *); #define setup_xen_features xen_setup_features #endif +#ifndef atomic_cmpxchg +#define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new))) +#endif + #endif -- cgit v1.2.3