diff src/thread/pth/SDL_systhread.c @ 321:af42e7c4c860

Fixes for GNU pthreads from Patrice
author Sam Lantinga <slouken@libsdl.org>
date Sat, 30 Mar 2002 18:53:23 +0000
parents f6ffac90895c
children 1d74ddc90cb2
line wrap: on
line diff
--- a/src/thread/pth/SDL_systhread.c	Thu Mar 28 16:20:10 2002 +0000
+++ b/src/thread/pth/SDL_systhread.c	Sat Mar 30 18:53:23 2002 +0000
@@ -51,15 +51,17 @@
 {
 	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);
 	}