diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-13 08:16:30 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-20 07:49:39 +0200 |
commit | 54550e048d3a49435912797d2024f80671e93267 (patch) | |
tree | bf49901187d98cf6a71975bdef7038d3ae0988c2 /cpukit/posix/src/pthreadgetattrnp.c | |
parent | score: Simplify _Thread_Life_action_handler() (diff) | |
download | rtems-54550e048d3a49435912797d2024f80671e93267.tar.bz2 |
posix: Rework pthread_join()
Rework pthread_join() to use _Thread_Join().
Close #2402.
Update #2555.
Update #2626.
Close #2714.
Diffstat (limited to 'cpukit/posix/src/pthreadgetattrnp.c')
-rw-r--r-- | cpukit/posix/src/pthreadgetattrnp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cpukit/posix/src/pthreadgetattrnp.c b/cpukit/posix/src/pthreadgetattrnp.c index 57c53183ed..30cee97f06 100644 --- a/cpukit/posix/src/pthreadgetattrnp.c +++ b/cpukit/posix/src/pthreadgetattrnp.c @@ -49,6 +49,12 @@ int pthread_getattr_np( api = the_thread->API_Extensions[ THREAD_API_POSIX ]; _POSIX_Threads_Copy_attributes( attr, &api->Attributes); + if ( _Thread_Is_joinable( the_thread ) ) { + attr->detachstate = PTHREAD_CREATE_JOINABLE; + } else { + attr->detachstate = PTHREAD_CREATE_DETACHED; + } + _Thread_State_release( the_thread, &lock_context ); return 0; } |