diff options
Diffstat (limited to 'lib/libkse/thread/thr_join.c')
-rw-r--r-- | lib/libkse/thread/thr_join.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/libkse/thread/thr_join.c b/lib/libkse/thread/thr_join.c index 161482e..63d0d58 100644 --- a/lib/libkse/thread/thr_join.c +++ b/lib/libkse/thread/thr_join.c @@ -67,14 +67,12 @@ pthread_join(pthread_t pthread, void **thread_return) if (pthread1 == NULL) { /* Return an error: */ - errno = ESRCH; - rval = -1; + rval = ESRCH; /* Check if this thread has been detached: */ } else if ((pthread->attr.flags & PTHREAD_DETACHED) != 0) { /* Return an error: */ - errno = ESRCH; - rval = -1; + rval = ESRCH; } /* Check if the thread is not dead: */ else if (pthread->state != PS_DEAD) { @@ -96,8 +94,7 @@ pthread_join(pthread_t pthread, void **thread_return) } } else { /* Return an error: */ - errno = ESRCH; - rval = -1; + rval = ESRCH; } } else { /* Check if the return value is required: */ |