diff options
Diffstat (limited to 'lib/libc_r/uthread/uthread_detach.c')
-rw-r--r-- | lib/libc_r/uthread/uthread_detach.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc_r/uthread/uthread_detach.c b/lib/libc_r/uthread/uthread_detach.c index f24d16f..08cace4 100644 --- a/lib/libc_r/uthread/uthread_detach.c +++ b/lib/libc_r/uthread/uthread_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; } |