Since we're directly reading and writing 'active' from different threads, it needs to be flagged volatile.

This commit is contained in:
Sam Lantinga 2011-01-26 19:20:16 -08:00
parent 9edcf9bc9b
commit 9b3ce56bfd

View file

@ -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;