diff options
| author | Julian Elischer <julian@FreeBSD.org> | 1997-02-05 23:26:09 +0000 |
|---|---|---|
| committer | Julian Elischer <julian@FreeBSD.org> | 1997-02-05 23:26:09 +0000 |
| commit | c840cec7c5df4547d37d9ca025553099b834c1aa (patch) | |
| tree | b2e6d3017e236268263978b585f2150cd10b1689 /lib/libpthread/thread/thr_detach.c | |
| parent | 3b576b3e5eac153732d10d222cc023a02adc3db7 (diff) | |
Notes
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; } |
