direct-io.hg

changeset 12232:dcdf02fde4cb

[XEN] Fix shadow-lock macro backslash alignments.
Signed-off-by: Xin Li <xin.b.li@intel.com>
author kfraser@localhost.localdomain
date Fri Nov 03 11:54:33 2006 +0000 (2006-11-03)
parents 044c6617e2be
children f1e7799750dc
files xen/include/asm-x86/shadow.h
line diff
     1.1 --- a/xen/include/asm-x86/shadow.h	Fri Nov 03 11:43:27 2006 +0000
     1.2 +++ b/xen/include/asm-x86/shadow.h	Fri Nov 03 11:54:33 2006 +0000
     1.3 @@ -23,7 +23,7 @@
     1.4  #ifndef _XEN_SHADOW_H
     1.5  #define _XEN_SHADOW_H
     1.6  
     1.7 -#include <public/domctl.h> 
     1.8 +#include <public/domctl.h>
     1.9  #include <xen/sched.h>
    1.10  #include <xen/perfc.h>
    1.11  #include <xen/domain_page.h>
    1.12 @@ -103,36 +103,36 @@
    1.13  #error shadow.h currently requires CONFIG_SMP
    1.14  #endif
    1.15  
    1.16 -#define shadow_lock_init(_d)                                   \
    1.17 -    do {                                                        \
    1.18 -        spin_lock_init(&(_d)->arch.shadow.lock);               \
    1.19 -        (_d)->arch.shadow.locker = -1;                         \
    1.20 -        (_d)->arch.shadow.locker_function = "nobody";          \
    1.21 +#define shadow_lock_init(_d)                            \
    1.22 +    do {                                                \
    1.23 +        spin_lock_init(&(_d)->arch.shadow.lock);        \
    1.24 +        (_d)->arch.shadow.locker = -1;                  \
    1.25 +        (_d)->arch.shadow.locker_function = "nobody";   \
    1.26      } while (0)
    1.27  
    1.28 -#define shadow_lock_is_acquired(_d)                            \
    1.29 +#define shadow_lock_is_acquired(_d)                     \
    1.30      (current->processor == (_d)->arch.shadow.locker)
    1.31  
    1.32  #define shadow_lock(_d)                                                 \
    1.33 -    do {                                                                 \
    1.34 +    do {                                                                \
    1.35          if ( unlikely((_d)->arch.shadow.locker == current->processor) ) \
    1.36 -        {                                                                \
    1.37 +        {                                                               \
    1.38              printk("Error: shadow lock held by %s\n",                   \
    1.39                     (_d)->arch.shadow.locker_function);                  \
    1.40 -            BUG();                                                       \
    1.41 -        }                                                                \
    1.42 +            BUG();                                                      \
    1.43 +        }                                                               \
    1.44          spin_lock(&(_d)->arch.shadow.lock);                             \
    1.45          ASSERT((_d)->arch.shadow.locker == -1);                         \
    1.46          (_d)->arch.shadow.locker = current->processor;                  \
    1.47          (_d)->arch.shadow.locker_function = __func__;                   \
    1.48      } while (0)
    1.49  
    1.50 -#define shadow_unlock(_d)                                              \
    1.51 -    do {                                                                \
    1.52 -        ASSERT((_d)->arch.shadow.locker == current->processor);        \
    1.53 -        (_d)->arch.shadow.locker = -1;                                 \
    1.54 -        (_d)->arch.shadow.locker_function = "nobody";                  \
    1.55 -        spin_unlock(&(_d)->arch.shadow.lock);                          \
    1.56 +#define shadow_unlock(_d)                                       \
    1.57 +    do {                                                        \
    1.58 +        ASSERT((_d)->arch.shadow.locker == current->processor); \
    1.59 +        (_d)->arch.shadow.locker = -1;                          \
    1.60 +        (_d)->arch.shadow.locker_function = "nobody";           \
    1.61 +        spin_unlock(&(_d)->arch.shadow.lock);                   \
    1.62      } while (0)
    1.63  
    1.64  /*