Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixes for GNU pthreads from Patrice
  • Loading branch information
slouken committed Mar 30, 2002
1 parent 45fbd4a commit 707ab0b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion configure.in
Expand Up @@ -1262,7 +1262,7 @@ CheckPTH()
use_pth=no
else
PTH_CFLAGS=`$PTH_CONFIG --cflags`
PTH_LIBS=`$PTH_CONFIG --libs`
PTH_LIBS=`$PTH_CONFIG --libs --all`
SDL_CFLAGS="$SDL_CFLAGS $PTH_CFLAGS"
SDL_LIBS="$SDL_LIBS $PTH_LIBS"
use_pth=yes
Expand Down
8 changes: 5 additions & 3 deletions src/thread/pth/SDL_systhread.c
Expand Up @@ -51,15 +51,17 @@ int SDL_SYS_CreateThread(SDL_Thread *thread, void *args)
{
pth_attr_t type;

type = pth_attr_new();

/* Set the thread attributes */
if ( pth_attr_init(&type) != 0 ) {
if ( pth_attr_init(type) != 0 ) {
SDL_SetError("Couldn't initialize pth attributes");
return(-1);
}
pth_attr_set(&type, PTH_ATTR_JOINABLE, TRUE);
pth_attr_set(type, PTH_ATTR_JOINABLE, TRUE);

/* Create the thread and go! */
if ( pth_spawn( &type, RunThread, args) != 0 ) {
if ( pth_spawn(type, RunThread, args) != 0 ) {
SDL_SetError("Not enough resources to create thread");
return(-1);
}
Expand Down

0 comments on commit 707ab0b

Please sign in to comment.