93c93
< * $FreeBSD: head/lib/libthr/thread/thr_attr.c 178446 2008-04-23 21:06:51Z delphij $
---
> * $FreeBSD: head/lib/libthr/thread/thr_attr.c 212536 2010-09-13 07:03:01Z davidxu $
135c135
< _pthread_attr_get_np(pthread_t pid, pthread_attr_t *dst)
---
> _pthread_attr_get_np(pthread_t pthread, pthread_attr_t *dst)
141c141
< if (pid == NULL || dst == NULL || *dst == NULL)
---
> if (pthread == NULL || dst == NULL || *dst == NULL)
145c145
< if ((ret = _thr_ref_add(curthread, pid, /*include dead*/0)) != 0)
---
> if ((ret = _thr_find_thread(curthread, pthread, /*include dead*/0)) != 0)
147,148c147,148
< attr = pid->attr;
< if (pid->tlflags & TLFLAGS_DETACHED)
---
> attr = pthread->attr;
> if (pthread->flags & THR_FLAGS_DETACHED)
150c150,151
< _thr_ref_delete(curthread, pid);
---
> THR_THREAD_UNLOCK(curthread, pthread);
>
< * $FreeBSD: head/lib/libthr/thread/thr_attr.c 178446 2008-04-23 21:06:51Z delphij $
---
> * $FreeBSD: head/lib/libthr/thread/thr_attr.c 212536 2010-09-13 07:03:01Z davidxu $
135c135
< _pthread_attr_get_np(pthread_t pid, pthread_attr_t *dst)
---
> _pthread_attr_get_np(pthread_t pthread, pthread_attr_t *dst)
141c141
< if (pid == NULL || dst == NULL || *dst == NULL)
---
> if (pthread == NULL || dst == NULL || *dst == NULL)
145c145
< if ((ret = _thr_ref_add(curthread, pid, /*include dead*/0)) != 0)
---
> if ((ret = _thr_find_thread(curthread, pthread, /*include dead*/0)) != 0)
147,148c147,148
< attr = pid->attr;
< if (pid->tlflags & TLFLAGS_DETACHED)
---
> attr = pthread->attr;
> if (pthread->flags & THR_FLAGS_DETACHED)
150c150,151
< _thr_ref_delete(curthread, pid);
---
> THR_THREAD_UNLOCK(curthread, pthread);
>