mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-01-07 22:03:20 +00:00
2ced6b09fc0ac120c3f1c15cff7022d334051fa3
This PR removes the incorrect implementation of `SDL_cond` currently included with the 3DS port. Pseudocode of the incorrect implementation of `SDL_CondWait` this PR removes: * Receive an `SDL_cond` backed by a `libctru` `CondVar` and an `SDL_mutex` backed by a `libctru` `RecursiveLock`. * Want to call `libctru` function `CondVar_Wait` which expects a `CondVar` and a `LightLock` (non-recursive lock) * Do so by calling this function with the internal (inadequately protected) `LightLock` member of the `RecursiveLock` (`&mutex->lock.lock` on line 105), without updating any internal thread or lock count fields of the `RecursiveLock`. Happy to discuss or test some examples. My own use case works much better with the generic cond logic, and this seems like a safe fix to me given that the generic logic is well-tested and this seems not to be. If you like the PR I'll send another one for the SDL2 branch.
Simple DirectMedia Layer (SDL for short) is a cross-platform library designed to make it easy to write multi-media software, such as games and emulators.
You can find the latest release and additional information at: https://www.libsdl.org/
Installation instructions and a quick introduction is available in INSTALL.md
This library is distributed under the terms of the zlib license, available in LICENSE.txt.
Enjoy!
Sam Lantinga (slouken@libsdl.org)
Languages
C
86.4%
C++
5.8%
Objective-C
3.4%
CMake
1.6%
Perl
0.8%
Other
1.7%