mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-22 12:48:28 +00:00
thread: Locking mutexes and rwlocks are now void functions.
Almost nothing checks these return values, and there's no reason a valid lock should fail to operate. The cases where a lock isn't valid (it's a bogus pointer, it was previously destroyed, a thread is unlocking a lock it doesn't own, etc) are undefined behavior and always were, and should be treated as an application bug. Reference Issue #8096.
This commit is contained in:
parent
082ef41566
commit
899eb0d042
21 changed files with 496 additions and 746 deletions
|
@ -707,6 +707,8 @@ The following functions have been renamed:
|
|||
|
||||
## SDL_mutex.h
|
||||
|
||||
SDL_LockMutex and SDL_UnlockMutex now return void; if the mutex is valid (including being a NULL pointer, which returns immediately), these functions never fail. If the mutex is invalid or the caller does something illegal, like unlock another thread's mutex, this is considered undefined behavior.
|
||||
|
||||
The following functions have been renamed:
|
||||
* SDL_CondBroadcast() => SDL_BroadcastCondition()
|
||||
* SDL_CondSignal() => SDL_SignalCondition()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue