mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-07 02:16:26 +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:
@@ -42,8 +42,8 @@ struct haptic_hwdata
|
||||
Uint8 userid; /* XInput userid index for this joystick */
|
||||
SDL_Thread *thread;
|
||||
SDL_mutex *mutex;
|
||||
volatile Uint32 stopTicks;
|
||||
volatile int stopThread;
|
||||
Uint32 stopTicks;
|
||||
SDL_atomic_t stopThread;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user