From 9b3ce56bfd0d14a307776860d4b04c4b10a25b79 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 26 Jan 2011 19:20:16 -0800 Subject: [PATCH] Since we're directly reading and writing 'active' from different threads, it needs to be flagged volatile. --- test/testatomic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;