aboutsummaryrefslogtreecommitdiffstats
path: root/unmodified_drivers
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-05-26 09:52:59 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-05-26 09:52:59 +0100
commitc7c69094e5ce66ed7a2b5d05420a7d1c01e3d6c4 (patch)
tree806700b1947e1d1073ec4598bd12e9db370a839c /unmodified_drivers
parent1d89b445615a361f0e3fbabc77496157cce34835 (diff)
downloadxen-c7c69094e5ce66ed7a2b5d05420a7d1c01e3d6c4.tar.gz
xen-c7c69094e5ce66ed7a2b5d05420a7d1c01e3d6c4.tar.bz2
xen-c7c69094e5ce66ed7a2b5d05420a7d1c01e3d6c4.zip
PV-on-HVM: Define atomic_cmpxchg() for old Linux kernels.
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
Diffstat (limited to 'unmodified_drivers')
-rw-r--r--unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h4
1 files changed, 4 insertions, 0 deletions
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