diff options
Diffstat (limited to 'lib/libpthread/thread/thr_detach.c')
| -rw-r--r-- | lib/libpthread/thread/thr_detach.c | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/lib/libpthread/thread/thr_detach.c b/lib/libpthread/thread/thr_detach.c index f24d16f2dbce..08cace4c0af8 100644 --- a/lib/libpthread/thread/thr_detach.c +++ b/lib/libpthread/thread/thr_detach.c @@ -49,7 +49,7 @@ pthread_detach(pthread_t * p_pthread)  	/* Check for invalid calling parameters: */  	if (p_pthread == NULL || (pthread = *p_pthread) == NULL) {  		/* Return an invalid argument error: */ -		_thread_seterrno(_thread_run, EINVAL); +		errno = EINVAL;  		rval = -1;  	}  	/* Check if the thread has not been detached: */ @@ -60,7 +60,7 @@ pthread_detach(pthread_t * p_pthread)  		/* Enter a loop to bring all threads off the join queue: */  		while ((next_thread = _thread_queue_deq(&pthread->join_queue)) != NULL) {  			/* Make the thread run: */ -			next_thread->state = PS_RUNNING; +			PTHREAD_NEW_STATE(next_thread,PS_RUNNING);  		}  		/* @@ -70,7 +70,7 @@ pthread_detach(pthread_t * p_pthread)  		*p_pthread = NULL;  	} else {  		/* Return an error: */ -		_thread_seterrno(_thread_run, ESRCH); +		errno = ESRCH;  		rval = -1;  	} | 
