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. --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404327
This commit is contained in:
parent
83fbb6981f
commit
3f0f9188ed
23 changed files with 53 additions and 51 deletions
|
@ -38,7 +38,7 @@ static const int sig_list[] = {
|
|||
/* RISC OS needs to know the main thread for
|
||||
* it's timer and event processing. */
|
||||
int riscos_using_threads = 0;
|
||||
Uint32 riscos_main_thread = 0; /* Thread running events */
|
||||
SDL_threadID riscos_main_thread = 0; /* Thread running events */
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -99,11 +99,10 @@ SDL_SYS_SetupThread(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
/* WARNING: This may not work for systems with 64-bit pid_t */
|
||||
Uint32
|
||||
SDL_threadID
|
||||
SDL_ThreadID(void)
|
||||
{
|
||||
return ((Uint32) pthread_self());
|
||||
return ((SDL_threadID) pthread_self());
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue