summaryrefslogtreecommitdiff
path: root/test/testatomic.c
diff options
context:
space:
mode:
authorSam Lantinga <slouken@libsdl.org>2011-01-26 19:20:16 -0800
committerSam Lantinga <slouken@libsdl.org>2011-01-26 19:20:16 -0800
commit35e7d9d18eeb6889e4e1dbca3a13753c010abd82 (patch)
treef59194e4b6c14f17e901dcbb2f01c74e0bf2dd32 /test/testatomic.c
parent3accd431cfe834d18d9afd1f37d9d0f7dfee2cbd (diff)
downloadsdl-35e7d9d18eeb6889e4e1dbca3a13753c010abd82.tar.gz
Since we're directly reading and writing 'active' from different threads, it needs to be flagged volatile.
Diffstat (limited to 'test/testatomic.c')
-rw-r--r--test/testatomic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/testatomic.c b/test/testatomic.c
index c034bd6de..98a6a7824 100644
--- a/test/testatomic.c
+++ b/test/testatomic.c
@@ -278,7 +278,7 @@ typedef struct
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;