Patchwork [2/2] Make spinlock_t types volatile

login
register
mail settings
Submitter Loïc Minier
Date Feb. 19, 2010, 9:02 p.m.
Message ID <1266613360-23069-2-git-send-email-lool@dooz.org>
Download mbox | patch
Permalink /patch/45881/
State New
Headers show

Comments

Loïc Minier - Feb. 19, 2010, 9:02 p.m.
---
 qemu-lock.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/qemu-lock.h b/qemu-lock.h
index 5c8eb34..23e3442 100644
--- a/qemu-lock.h
+++ b/qemu-lock.h
@@ -34,7 +34,7 @@ 
 #else
 
 #ifdef CONFIG_GCC_ATOMIC_BUILTINS
-typedef int spinlock_t;
+typedef volatile int spinlock_t;
 
 #define SPIN_LOCK_UNLOCKED 0
 
@@ -43,7 +43,7 @@  typedef int spinlock_t;
 
 #if defined(__hppa__)
 
-typedef int spinlock_t[4];
+typedef volatile int spinlock_t[4];
 
 #define SPIN_LOCK_UNLOCKED { 1, 1, 1, 1 }
 
@@ -54,7 +54,7 @@  static inline void resetlock (spinlock_t *p)
 
 #else
 
-typedef int spinlock_t;
+typedef volatile int spinlock_t;
 
 #define SPIN_LOCK_UNLOCKED 0