Rename SDL mutex, semaphore and condition variable types to match SDL 3.0 naming convention

This commit is contained in:
Sam Lantinga
2023-04-28 07:31:12 -07:00
parent 61c0c009ab
commit 87ad71f9b2
75 changed files with 452 additions and 422 deletions

View File

@@ -30,12 +30,12 @@ extern "C" {
#include <Windows.h>
/* Create a mutex */
extern "C" SDL_mutex *
extern "C" SDL_Mutex *
SDL_CreateMutex(void)
{
/* Allocate and initialize the mutex */
try {
SDL_mutex *mutex = new SDL_mutex;
SDL_Mutex *mutex = new SDL_Mutex;
return mutex;
} catch (std::system_error &ex) {
SDL_SetError("unable to create a C++ mutex: code=%d; %s", ex.code(), ex.what());
@@ -48,7 +48,7 @@ SDL_CreateMutex(void)
/* Free the mutex */
extern "C" void
SDL_DestroyMutex(SDL_mutex *mutex)
SDL_DestroyMutex(SDL_Mutex *mutex)
{
if (mutex != NULL) {
delete mutex;
@@ -57,7 +57,7 @@ SDL_DestroyMutex(SDL_mutex *mutex)
/* Lock the mutex */
extern "C" int
SDL_LockMutex(SDL_mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */
SDL_LockMutex(SDL_Mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */
{
if (mutex == NULL) {
return 0;
@@ -72,7 +72,7 @@ SDL_LockMutex(SDL_mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't k
}
/* TryLock the mutex */
int SDL_TryLockMutex(SDL_mutex *mutex)
int SDL_TryLockMutex(SDL_Mutex *mutex)
{
int retval = 0;
@@ -88,7 +88,7 @@ int SDL_TryLockMutex(SDL_mutex *mutex)
/* Unlock the mutex */
extern "C" int
SDL_UnlockMutex(SDL_mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */
SDL_UnlockMutex(SDL_Mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */
{
if (mutex == NULL) {
return 0;