SDL/src/sensor
Sam Lantinga d59caffe2c Added support for clang thread-safety analysis
The annotations have been added to SDL_mutex.h and have been made public so applications can enable this for their own code.

Clang assumes that locking and unlocking can't fail, but SDL has the concept of a NULL mutex, so the mutex functions have been changed not to report errors if a mutex hasn't been initialized. We do have mutexes that might be accessed when they are NULL, notably in the event system, so this is an important change.

This commit cleans up a bunch of rare race conditions in the joystick and game controller code so now everything should be completely protected by the joystick lock.

To test this, change the compiler to "clang -Wthread-safety -Werror=thread-safety -DSDL_THREAD_SAFETY_ANALYSIS"
2022-12-14 09:29:19 -08:00
..
android Small format changed (using clang-format 15.0.2-1) 2022-12-01 08:29:15 -08:00
coremotion Update for SDL3 coding style (#6717) 2022-11-30 12:57:41 -08:00
dummy Update for SDL3 coding style (#6717) 2022-11-30 12:57:41 -08:00
n3ds Update for SDL3 coding style (#6717) 2022-11-30 12:57:41 -08:00
vita Update for SDL3 coding style (#6717) 2022-11-30 12:57:41 -08:00
windows Update for SDL3 coding style (#6717) 2022-11-30 12:57:41 -08:00
SDL_sensor.c Added support for clang thread-safety analysis 2022-12-14 09:29:19 -08:00
SDL_sensor_c.h Added microsecond timestamp to sensor values for PS4 and PS5 controllers using the HIDAPI driver 2022-09-27 09:56:49 -07:00
SDL_syssensor.h Update for SDL3 coding style (#6717) 2022-11-30 12:57:41 -08:00