mirror of
https://github.com/yawut/SDL.git
synced 2026-09-08 17:16:19 -05:00
Changed the name of SDL_mutexP() SDL_mutexV()
This commit is contained in:
@@ -85,7 +85,7 @@ SDL_AddThread(SDL_Thread * thread)
|
||||
return;
|
||||
}
|
||||
}
|
||||
SDL_mutexP(thread_lock);
|
||||
SDL_LockMutex(thread_lock);
|
||||
|
||||
/* Expand the list of threads, if necessary */
|
||||
#ifdef DEBUG_THREADS
|
||||
@@ -118,7 +118,7 @@ SDL_DelThread(SDL_Thread * thread)
|
||||
if (!thread_lock) {
|
||||
return;
|
||||
}
|
||||
SDL_mutexP(thread_lock);
|
||||
SDL_LockMutex(thread_lock);
|
||||
for (i = 0; i < SDL_numthreads; ++i) {
|
||||
if (thread == SDL_Threads[i]) {
|
||||
break;
|
||||
@@ -164,7 +164,7 @@ SDL_GetErrBuf(void)
|
||||
SDL_threadID this_thread;
|
||||
|
||||
this_thread = SDL_ThreadID();
|
||||
SDL_mutexP(thread_lock);
|
||||
SDL_LockMutex(thread_lock);
|
||||
for (i = 0; i < SDL_numthreads; ++i) {
|
||||
if (this_thread == SDL_Threads[i]->threadid) {
|
||||
errbuf = &SDL_Threads[i]->errbuf;
|
||||
|
||||
@@ -70,7 +70,7 @@ SDL_DestroyMutex(SDL_mutex * mutex)
|
||||
|
||||
/* Lock the mutex */
|
||||
int
|
||||
SDL_mutexP(SDL_mutex * mutex)
|
||||
SDL_LockMutex(SDL_mutex * mutex)
|
||||
{
|
||||
#if SDL_THREADS_DISABLED
|
||||
return 0;
|
||||
|
||||
@@ -123,8 +123,8 @@ SDL_DestroySemaphore(SDL_sem * sem)
|
||||
}
|
||||
SDL_DestroyCond(sem->count_nonzero);
|
||||
if (sem->count_lock) {
|
||||
SDL_mutexP(sem->count_lock);
|
||||
SDL_mutexV(sem->count_lock);
|
||||
SDL_LockMutex(sem->count_lock);
|
||||
SDL_UnlockMutex(sem->count_lock);
|
||||
SDL_DestroyMutex(sem->count_lock);
|
||||
}
|
||||
SDL_free(sem);
|
||||
|
||||
@@ -78,7 +78,7 @@ SDL_DestroyMutex(SDL_mutex * mutex)
|
||||
|
||||
/* Lock the mutex */
|
||||
int
|
||||
SDL_mutexP(SDL_mutex * mutex)
|
||||
SDL_LockMutex(SDL_mutex * mutex)
|
||||
{
|
||||
#ifdef DISABLE_THREADS
|
||||
return 0;
|
||||
@@ -143,7 +143,7 @@ SDL_TryLockMutex(SDL_mutex * mutex)
|
||||
|
||||
/* Unlock the mutex */
|
||||
int
|
||||
SDL_mutexV(SDL_mutex * mutex)
|
||||
SDL_UnlockMutex(SDL_mutex * mutex)
|
||||
{
|
||||
#ifdef DISABLE_THREADS
|
||||
return 0;
|
||||
|
||||
@@ -129,8 +129,8 @@ SDL_DestroySemaphore(SDL_sem * sem)
|
||||
SDL_Delay(10);
|
||||
}
|
||||
SDL_DestroyCond(sem->count_nonzero);
|
||||
SDL_mutexP(sem->count_lock);
|
||||
SDL_mutexV(sem->count_lock);
|
||||
SDL_LockMutex(sem->count_lock);
|
||||
SDL_UnlockMutex(sem->count_lock);
|
||||
SDL_DestroyMutex(sem->count_lock);
|
||||
free(sem);
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ SDL_DestroyMutex(SDL_mutex * mutex)
|
||||
|
||||
/* Lock the mutex */
|
||||
int
|
||||
SDL_mutexP(SDL_mutex * mutex)
|
||||
SDL_LockMutex(SDL_mutex * mutex)
|
||||
{
|
||||
int retval;
|
||||
#if FAKE_RECURSIVE_MUTEX
|
||||
@@ -165,7 +165,7 @@ SDL_TryLockMutex(SDL_mutex * mutex)
|
||||
}
|
||||
|
||||
int
|
||||
SDL_mutexV(SDL_mutex * mutex)
|
||||
SDL_UnlockMutex(SDL_mutex * mutex)
|
||||
{
|
||||
int retval;
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ SDL_DestroyMutex(SDL_mutex * mutex)
|
||||
|
||||
/* Lock the mutex */
|
||||
int
|
||||
SDL_mutexP(SDL_mutex * mutex)
|
||||
SDL_LockMutex(SDL_mutex * mutex)
|
||||
{
|
||||
if (mutex == NULL) {
|
||||
SDL_SetError("Passed a NULL mutex");
|
||||
@@ -93,7 +93,7 @@ SDL_TryLockMutex(SDL_mutex * mutex)
|
||||
|
||||
/* Unlock the mutex */
|
||||
int
|
||||
SDL_mutexV(SDL_mutex * mutex)
|
||||
SDL_UnlockMutex(SDL_mutex * mutex)
|
||||
{
|
||||
if (mutex == NULL) {
|
||||
SDL_SetError("Passed a NULL mutex");
|
||||
|
||||
Reference in New Issue
Block a user