comparison 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
comparison
equal deleted inserted replaced
5102:cce11d33d5c6 5104:42a7591530d5
276 SDL_atomic_t watcher; 276 SDL_atomic_t watcher;
277 277
278 char cache_pad4[CACHELINE-sizeof(SDL_SpinLock)-2*sizeof(SDL_atomic_t)]; 278 char cache_pad4[CACHELINE-sizeof(SDL_SpinLock)-2*sizeof(SDL_atomic_t)];
279 #endif 279 #endif
280 280
281 SDL_bool active; 281 volatile SDL_bool active;
282 282
283 /* Only needed for the mutex test */ 283 /* Only needed for the mutex test */
284 SDL_mutex *mutex; 284 SDL_mutex *mutex;
285 285
286 } SDL_EventQueue; 286 } SDL_EventQueue;