Return real detached state.

This commit is contained in:
David Xu 2006-01-09 03:59:51 +00:00
parent 465ad22910
commit 4160cda0dc

View File

@ -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));