Fixes for GNU pthreads from Patrice
authorSam Lantinga <slouken@libsdl.org>
Sat, 30 Mar 2002 18:53:23 +0000
changeset 321af42e7c4c860
parent 320 66f815c147ed
child 322 fd93a09655e3
Fixes for GNU pthreads from Patrice
configure.in
src/thread/pth/SDL_systhread.c
     1.1 --- a/configure.in	Thu Mar 28 16:20:10 2002 +0000
     1.2 +++ b/configure.in	Sat Mar 30 18:53:23 2002 +0000
     1.3 @@ -1262,7 +1262,7 @@
     1.4              use_pth=no
     1.5          else
     1.6              PTH_CFLAGS=`$PTH_CONFIG --cflags`
     1.7 -            PTH_LIBS=`$PTH_CONFIG --libs`
     1.8 +            PTH_LIBS=`$PTH_CONFIG --libs --all`
     1.9              SDL_CFLAGS="$SDL_CFLAGS $PTH_CFLAGS"
    1.10              SDL_LIBS="$SDL_LIBS $PTH_LIBS"
    1.11              use_pth=yes
     2.1 --- a/src/thread/pth/SDL_systhread.c	Thu Mar 28 16:20:10 2002 +0000
     2.2 +++ b/src/thread/pth/SDL_systhread.c	Sat Mar 30 18:53:23 2002 +0000
     2.3 @@ -51,15 +51,17 @@
     2.4  {
     2.5  	pth_attr_t type;
     2.6  
     2.7 +	type = pth_attr_new();
     2.8 +
     2.9  	/* Set the thread attributes */
    2.10 -	if ( pth_attr_init(&type) != 0 ) {
    2.11 +	if ( pth_attr_init(type) != 0 ) {
    2.12  		SDL_SetError("Couldn't initialize pth attributes");
    2.13  		return(-1);
    2.14  	}
    2.15 -	pth_attr_set(&type, PTH_ATTR_JOINABLE, TRUE);
    2.16 +	pth_attr_set(type, PTH_ATTR_JOINABLE, TRUE);
    2.17  
    2.18  	/* Create the thread and go! */
    2.19 -	if ( pth_spawn( &type, RunThread, args) != 0 ) {
    2.20 +	if ( pth_spawn(type, RunThread, args) != 0 ) {
    2.21  		SDL_SetError("Not enough resources to create thread");
    2.22  		return(-1);
    2.23  	}