mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-13 20:21:35 +02:00
Rename SDL mutex, semaphore and condition variable types to match SDL 3.0 naming convention
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user