diff options
author | davidxu <davidxu@FreeBSD.org> | 2006-01-09 03:59:51 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2006-01-09 03:59:51 +0000 |
commit | db9594be6ec1797938c3e501bb29e7e953d6961a (patch) | |
tree | 8b92d14df53dacb685d0b7cf994a6a3774b0e067 /lib | |
parent | a594cf6559453086d8fd7236132b0ad950df5be4 (diff) | |
download | FreeBSD-src-db9594be6ec1797938c3e501bb29e7e953d6961a.zip FreeBSD-src-db9594be6ec1797938c3e501bb29e7e953d6961a.tar.gz |
Return real detached state.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libthr/thread/thr_attr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_attr.c b/lib/libthr/thread/thr_attr.c index 9e65548..342d457 100644 --- a/lib/libthr/thread/thr_attr.c +++ b/lib/libthr/thread/thr_attr.c @@ -145,6 +145,8 @@ _pthread_attr_get_np(pthread_t pid, pthread_attr_t *dst) if ((ret = _thr_ref_add(curthread, pid, /*include dead*/0)) != 0) return (ret); attr = pid->attr; + if (pid->tlflags & TLFLAGS_DETACHED) + attr.flags |= PTHREAD_DETACHED; _thr_ref_delete(curthread, pid); memcpy(*dst, &attr, sizeof(struct pthread_attr)); |