ia64/xen-unstable

changeset 15807:fba9884685fb

PV-on-HVM: Define DEFINE_RWLOCK() macro for older Linux kernels.
Signed-off-by: Ben Guthro <bguthro@virtualron.com>
author kfraser@localhost.localdomain
date Thu Aug 30 16:17:07 2007 +0100 (2007-08-30)
parents 3738840029b4
children b3689eb59c5e
files unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
line diff
     1.1 --- a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h	Thu Aug 30 16:13:42 2007 +0100
     1.2 +++ b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h	Thu Aug 30 16:17:07 2007 +0100
     1.3 @@ -116,4 +116,13 @@ extern char *kasprintf(gfp_t gfp, const 
     1.4  #define DEFINE_SEQLOCK(x) seqlock_t x = SEQLOCK_UNLOCKED
     1.5  #endif
     1.6  
     1.7 +/* Bug in RHEL4-U3: rw_lock_t is mistakenly defined in DEFINE_RWLOCK() macro */
     1.8 +#if defined(__LINUX_SPINLOCK_H) && defined(DEFINE_RWLOCK)
     1.9 +#define rw_lock_t rwlock_t
    1.10  #endif
    1.11 +
    1.12 +#if defined(__LINUX_SPINLOCK_H) && !defined(DEFINE_RWLOCK)
    1.13 +#define DEFINE_RWLOCK(x) rwlock_t x = RW_LOCK_UNLOCKED
    1.14 +#endif
    1.15 +
    1.16 +#endif