From patchwork Fri Feb 19 21:02:40 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/2] Make spinlock_t types volatile Date: Fri, 19 Feb 2010 11:02:40 -0000 From: =?utf-8?q?Lo=C3=AFc_Minier_=3Clool=40dooz=2Eorg=3E?= X-Patchwork-Id: 45881 Message-Id: <1266613360-23069-2-git-send-email-lool@dooz.org> To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Lo=C3=AFc=20Minier?= --- qemu-lock.h | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) 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