Patrice's fixes for GNU Pthread support
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40330
This commit is contained in:
parent
471f52e3e4
commit
e3affe9e81
8 changed files with 259 additions and 13 deletions
|
@ -52,6 +52,12 @@ int SDL_ThreadsInit(void)
|
|||
{
|
||||
int retval;
|
||||
|
||||
#ifdef ENABLE_PTH
|
||||
if (!pth_init()) {
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
retval = 0;
|
||||
/* Set the thread lock creation flag so that we can reuse an
|
||||
existing lock on the system - since this mutex never gets
|
||||
|
@ -80,6 +86,10 @@ void SDL_ThreadsQuit()
|
|||
if ( mutex != NULL ) {
|
||||
SDL_DestroyMutex(mutex);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_PTH
|
||||
pth_kill();
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Routines for manipulating the thread list */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue