changeset 5104:42a7591530d5

Since we're directly reading and writing 'active' from different threads, it needs to be flagged volatile.
author Sam Lantinga <slouken@libsdl.org>
date Wed, 26 Jan 2011 19:20:16 -0800
parents cce11d33d5c6
children 797b37c0c046
files test/testatomic.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/testatomic.c	Wed Jan 26 12:23:32 2011 -0800
+++ b/test/testatomic.c	Wed Jan 26 19:20:16 2011 -0800
@@ -278,7 +278,7 @@
     char cache_pad4[CACHELINE-sizeof(SDL_SpinLock)-2*sizeof(SDL_atomic_t)];
 #endif
 
-    SDL_bool active;
+    volatile SDL_bool active;
 
     /* Only needed for the mutex test */
     SDL_mutex *mutex;