mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-10 21:38:14 +00:00
Remove almost all instances of "volatile" keyword.
As Tiffany pointed out in Bugzilla, volatile is not useful for thread safety: https://software.intel.com/en-us/blogs/2007/11/30/volatile-almost-useless-for-multi-threaded-programming/ Some of these volatiles didn't need to be, some were otherwise protected by spinlocks or mutexes, and some got moved over to SDL_atomic_t data, etc. Fixes Bugzilla #3220.
This commit is contained in:
@@ -293,7 +293,7 @@ SDL_InitDynamicAPI(void)
|
||||
* SDL_CreateThread() would also call this function before building the
|
||||
* new thread).
|
||||
*/
|
||||
static volatile SDL_bool already_initialized = SDL_FALSE;
|
||||
static SDL_bool already_initialized = SDL_FALSE;
|
||||
|
||||
/* SDL_AtomicLock calls SDL mutex functions to emulate if
|
||||
SDL_ATOMIC_DISABLED, which we can't do here, so in such a
|
||||
|
Reference in New Issue
Block a user