Mercurial > sdl-ios-xcode
diff src/thread/generic/SDL_sysmutex.c @ 3578:0d1b16ee0bca
Fixed bug #741
The thread ID is an unsigned long so it can hold pthread_t so people can do naughty things with it.
I'm going to be adding additional useful thread API functions, but this should prevent crashes in people's existing code on 64-bit architectures.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 16 Dec 2009 04:48:11 +0000 |
parents | 99210400e8b9 |
children | f7b03b6838cb |
line wrap: on
line diff
--- a/src/thread/generic/SDL_sysmutex.c Wed Dec 16 03:02:31 2009 +0000 +++ b/src/thread/generic/SDL_sysmutex.c Wed Dec 16 04:48:11 2009 +0000 @@ -30,7 +30,7 @@ struct SDL_mutex { int recursive; - Uint32 owner; + SDL_threadID owner; SDL_sem *sem; }; @@ -76,7 +76,7 @@ #if SDL_THREADS_DISABLED return 0; #else - Uint32 this_thread; + SDL_threadID this_thread; if (mutex == NULL) { SDL_SetError("Passed a NULL mutex");