Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Since we're directly reading and writing 'active' from different thre…
Browse files Browse the repository at this point in the history
…ads, it needs to be flagged volatile.
  • Loading branch information
slouken committed Jan 27, 2011
1 parent 0c9fbf8 commit 8fcd406
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/testatomic.c
Expand Up @@ -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;
Expand Down

0 comments on commit 8fcd406

Please sign in to comment.