#define SDL_MutexLock(m) SDL_mutexP(m)
#define SDL_MutexUnlock(m) SDL_mutexV(m)
#define SDL_MutexLock(m) SDL_mutexP(m)
#define SDL_MutexUnlock(m) SDL_mutexV(m)
SDL_LockMutex and SDL_UnlockMutex are already defined in SDL_mutex.h
which is #included by SDL_thread.h.> From: peter <grigorii.pechorin at gmail.com>
Subject: [SDL] can we please add this to SDL_thread.h
#define SDL_MutexLock(m) SDL_mutexP(m)
#define SDL_MutexUnlock(m) SDL_mutexV(m)
If you look in SDL_mutex.h you will find the following lines
/* Lock the mutex (Returns 0, or -1 on error) */
#define SDL_LockMutex(m) SDL_mutexP(m)
extern DECLSPEC int SDLCALL SDL_mutexP(SDL_mutex *mutex);/* Unlock the mutex (Returns 0, or -1 on error)
It is an error to unlock a mutex that has not been locked by
the current thread, and doing so results in undefined behavior.
*/
#define SDL_UnlockMutex(m) SDL_mutexV(m)
extern DECLSPEC int SDLCALL SDL_mutexV(SDL_mutex *mutex);
and while SDL_LockMutex is not the same as SDL_MutexLock, it
does serve the same purpose. Same is true for SDL_UnlockMutex.
If you really prefer SDL_MutexLock to SDL_LockMutex I supose
you should submit a patch.
Bob PendletonOn Thu, 2005-10-06 at 15:45 +0000, peter wrote:
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
–
±-------------------------------------+
- Bob Pendleton: writer and programmer +
- email: Bob at Pendleton.com +
- web: www.GameProgrammer.com +
- www.Wise2Food.com +
- nutrient info on 7,000+ common foods +
±-------------------------------------+