diff test/testatomic.c @ 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 1b3678ac9804
children e337f792c6a7
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;