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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404327
This commit is contained in:
Sam Lantinga 2009-12-16 04:48:11 +00:00
parent 83fbb6981f
commit 3f0f9188ed
23 changed files with 53 additions and 51 deletions

View file

@ -38,7 +38,7 @@ static char rcsid =
struct SDL_mutex
{
int recursive;
Uint32 owner;
SDL_threadID owner;
SDL_sem *sem;
};
@ -84,7 +84,7 @@ SDL_mutexP(SDL_mutex * mutex)
#ifdef DISABLE_THREADS
return 0;
#else
Uint32 this_thread;
SDL_threadID this_thread;
if (mutex == NULL) {
SDL_SetError("Passed a NULL mutex");