[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] PV-on-HVM: Define DEFINE_RWLOCK() macro for older Linux kernels.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1188487027 -3600
# Node ID fba9884685fbe86bb8ab1f73b8a74c42455c33c9
# Parent  3738840029b4286721ce51ccd3444affeedb69e8
PV-on-HVM: Define DEFINE_RWLOCK() macro for older Linux kernels.
Signed-off-by: Ben Guthro <bguthro@xxxxxxxxxxxxxx>
---
 unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h |    9 
+++++++++
 1 files changed, 9 insertions(+)

diff -r 3738840029b4 -r fba9884685fb 
unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
--- a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h Thu Aug 
30 16:13:42 2007 +0100
+++ b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h Thu Aug 
30 16:17:07 2007 +0100
@@ -116,4 +116,13 @@ extern char *kasprintf(gfp_t gfp, const 
 #define DEFINE_SEQLOCK(x) seqlock_t x = SEQLOCK_UNLOCKED
 #endif
 
+/* Bug in RHEL4-U3: rw_lock_t is mistakenly defined in DEFINE_RWLOCK() macro */
+#if defined(__LINUX_SPINLOCK_H) && defined(DEFINE_RWLOCK)
+#define rw_lock_t rwlock_t
 #endif
+
+#if defined(__LINUX_SPINLOCK_H) && !defined(DEFINE_RWLOCK)
+#define DEFINE_RWLOCK(x) rwlock_t x = RW_LOCK_UNLOCKED
+#endif
+
+#endif

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.