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

@@ -26,7 +26,7 @@
#include "SDL_systhread_c.h"
struct SDL_mutex
struct SDL_Mutex
{
TInt handle;
};
@@ -39,7 +39,7 @@ static TInt NewMutex(const TDesC &aName, TAny *aPtr1, TAny *)
}
/* Create a mutex */
SDL_mutex *
SDL_Mutex *
SDL_CreateMutex(void)
{
RMutex rmutex;
@@ -49,13 +49,13 @@ SDL_CreateMutex(void)
SDL_SetError("Couldn't create mutex.");
return NULL;
}
SDL_mutex *mutex = new /*(ELeave)*/ SDL_mutex;
SDL_Mutex *mutex = new /*(ELeave)*/ SDL_Mutex;
mutex->handle = rmutex.Handle();
return mutex;
}
/* Free the mutex */
void SDL_DestroyMutex(SDL_mutex *mutex)
void SDL_DestroyMutex(SDL_Mutex *mutex)
{
if (mutex) {
RMutex rmutex;
@@ -68,7 +68,7 @@ void SDL_DestroyMutex(SDL_mutex *mutex)
}
/* Lock the mutex */
int SDL_LockMutex(SDL_mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */
int SDL_LockMutex(SDL_Mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */
{
if (mutex == NULL) {
return 0;
@@ -84,7 +84,7 @@ int SDL_LockMutex(SDL_mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn
/* Try to lock the mutex */
#if 0
int
SDL_TryLockMutex(SDL_mutex *mutex)
SDL_TryLockMutex(SDL_Mutex *mutex)
{
if (mutex == NULL)
{
@@ -97,7 +97,7 @@ SDL_TryLockMutex(SDL_mutex *mutex)
#endif
/* Unlock the mutex */
int SDL_UnlockMutex(SDL_mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */
int SDL_UnlockMutex(SDL_Mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS /* clang doesn't know about NULL mutexes */
{
if (mutex == NULL) {
return 0;