diff mbox

[2/2] Make spinlock_t types volatile

Message ID 1266613360-23069-2-git-send-email-lool@dooz.org
State New
Headers show

Commit Message

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

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