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