Skip to content

Commit

Permalink
1.2 used SDL_MutexP, 2.0 uses SDL_LockMutex, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Feb 10, 2019
1 parent db5a895 commit b04e271
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions src/SDL12_compat.c
Expand Up @@ -1994,6 +1994,18 @@ SDL_CreateThread(int (SDLCALL *fn)(void *), void *data)
}
#endif

DECLSPEC int SDLCALL
SDL_mutexP(SDL_mutex *mutex)
{
return SDL20_LockMutex(mutex);
}

DECLSPEC int SDLCALL
SDL_mutexV(SDL_mutex *mutex)
{
return SDL20_UnlockMutex(mutex);
}


/* !!! FIXME: Removed from 2.0; do nothing. We can't even report failure. */
DECLSPEC void SDLCALL SDL_KillThread(SDL_Thread *thread) {}
Expand Down
4 changes: 2 additions & 2 deletions src/SDL20_syms.h
Expand Up @@ -118,8 +118,8 @@ SDL20_SYM_PASSTHROUGH(Uint32,GetThreadID,(SDL_Thread *a),(a),return)
SDL20_SYM_PASSTHROUGH(Uint32,ThreadID,(void),(),return)
SDL20_SYM_PASSTHROUGH(void,WaitThread,(SDL_Thread *a, int *b),(a,b),)
SDL20_SYM_PASSTHROUGH(SDL_mutex*,CreateMutex,(void),(),return)
SDL20_SYM_PASSTHROUGH(int,mutexP,(SDL_mutex *a),(a),return)
SDL20_SYM_PASSTHROUGH(int,mutexV,(SDL_mutex *a),(a),return)
SDL20_SYM(int,LockMutex,(SDL_mutex *a),(a),return)
SDL20_SYM(int,UnlockMutex,(SDL_mutex *a),(a),return)
SDL20_SYM_PASSTHROUGH(void,DestroyMutex,(SDL_mutex *a),(a),)
SDL20_SYM_PASSTHROUGH(SDL_sem*,CreateSemaphore,(Uint32 a),(a),return)
SDL20_SYM_PASSTHROUGH(void,DestroySemaphore,(SDL_sem *a),(a),)
Expand Down

0 comments on commit b04e271

Please sign in to comment.