summaryrefslogtreecommitdiffstats
path: root/lib/libkse/thread/thr_join.c
diff options
context:
space:
mode:
authoralex <alex@FreeBSD.org>1997-11-25 01:29:16 +0000
committeralex <alex@FreeBSD.org>1997-11-25 01:29:16 +0000
commit2d792e656e2819795c575a1abeb8dc54e2357484 (patch)
treeafcf53c94eef7b38ab83072ef9f8a80651b0230d /lib/libkse/thread/thr_join.c
parent674aa81547dfa76c24a1a45b5acb9119cab75311 (diff)
downloadFreeBSD-src-2d792e656e2819795c575a1abeb8dc54e2357484.zip
FreeBSD-src-2d792e656e2819795c575a1abeb8dc54e2357484.tar.gz
Modify the return values to comply with POSIX. Previously these
functions would return -1 and set errno to indicate the specific error. POSIX requires that the functions return the error code as the return value of the function instead.
Diffstat (limited to 'lib/libkse/thread/thr_join.c')
-rw-r--r--lib/libkse/thread/thr_join.c9
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: */
OpenPOWER on IntegriCloud