SDL/src
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
..
atomic Update for SDL3 coding style (#6717) 2022-11-30 12:57:41 -08:00
audio Added support for clang thread-safety analysis 2022-12-14 09:29:19 -08:00
core DBus: add a reference to the connection 2022-12-14 17:46:52 +01:00
cpuinfo Update for SDL3 coding style (#6717) 2022-11-30 12:57:41 -08:00
dynapi Added support for clang thread-safety analysis 2022-12-14 09:29:19 -08:00
events Added support for clang thread-safety analysis 2022-12-14 09:29:19 -08:00
file Clang-Tidy fixes (#6725) 2022-12-01 13:08:50 -08:00
filesystem Clang-Tidy fixes (#6725) 2022-12-01 13:08:50 -08:00
haptic Added support for clang thread-safety analysis 2022-12-14 09:29:19 -08:00
hidapi Clang-Tidy fixes (#6725) 2022-12-01 13:08:50 -08:00
joystick Added support for clang thread-safety analysis 2022-12-14 09:29:19 -08:00
libm N3DS port (squashed) 2022-10-10 08:50:59 -07:00
loadso Update for SDL3 coding style (#6717) 2022-11-30 12:57:41 -08:00
locale Clang-Tidy fixes (#6725) 2022-12-01 13:08:50 -08:00
main Clang-Tidy fixes (#6725) 2022-12-01 13:08:50 -08:00
misc Clang-Tidy fixes (#6725) 2022-12-01 13:08:50 -08:00
power Clang-Tidy fixes (#6725) 2022-12-01 13:08:50 -08:00
render Fix wrong clang-tidy modification. This is an integer division. Thanks @meyraud705 (see PR #6725) 2022-12-03 13:39:03 +01:00
sensor Added support for clang thread-safety analysis 2022-12-14 09:29:19 -08:00
stdlib Clang-Tidy fixes (#6725) 2022-12-01 13:08:50 -08:00
test Fixed build 2022-12-09 10:22:18 -08:00
thread Added support for clang thread-safety analysis 2022-12-14 09:29:19 -08:00
timer Update for SDL3 coding style (#6717) 2022-11-30 12:57:41 -08:00
video Detect display change when fullscreen desktop windows move displays 2022-12-12 20:28:07 -08:00
SDL.c Update for SDL3 coding style (#6717) 2022-11-30 12:57:41 -08:00
SDL_assert.c Added support for clang thread-safety analysis 2022-12-14 09:29:19 -08:00
SDL_assert_c.h Updated copyright for 2022 2022-01-03 09:40:21 -08:00
SDL_dataqueue.c Update for SDL3 coding style (#6717) 2022-11-30 12:57:41 -08:00
SDL_dataqueue.h Update for SDL3 coding style (#6717) 2022-11-30 12:57:41 -08:00
SDL_error.c Clang-Tidy fixes (#6725) 2022-12-01 13:08:50 -08:00
SDL_error_c.h Removed the limit on the size of the SDL error message 2022-06-27 16:59:50 -07:00
SDL_guid.c Update for SDL3 coding style (#6717) 2022-11-30 12:57:41 -08:00
SDL_hints.c Update for SDL3 coding style (#6717) 2022-11-30 12:57:41 -08:00
SDL_hints_c.h Updated copyright for 2022 2022-01-03 09:40:21 -08:00
SDL_internal.h Update for SDL3 coding style (#6717) 2022-11-30 12:57:41 -08:00
SDL_list.c Update for SDL3 coding style (#6717) 2022-11-30 12:57:41 -08:00
SDL_list.h Update for SDL3 coding style (#6717) 2022-11-30 12:57:41 -08:00
SDL_log.c Added support for clang thread-safety analysis 2022-12-14 09:29:19 -08:00
SDL_log_c.h Added declaration of SDL_LogInit() and SDL_LogQuit() 2022-04-28 15:01:34 -07:00
SDL_utils.c Fixed declaration-after-statement warning 2022-07-18 07:31:23 -07:00
SDL_utils_c.h Fixed comment (thanks @pionere!) 2022-07-18 07:18:56 -07:00