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/pthreadcreate.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/pthreadcreate.c')
-rw-r--r-- | cpukit/posix/src/pthreadcreate.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cpukit/posix/src/pthreadcreate.c b/cpukit/posix/src/pthreadcreate.c index eedb80e203..1fe3fe4465 100644 --- a/cpukit/posix/src/pthreadcreate.c +++ b/cpukit/posix/src/pthreadcreate.c @@ -201,6 +201,10 @@ int pthread_create( return EAGAIN; } + if ( the_attr->detachstate == PTHREAD_CREATE_DETACHED ) { + the_thread->Life.state |= THREAD_LIFE_DETACHED; + } + #if defined(RTEMS_SMP) && __RTEMS_HAVE_SYS_CPUSET_H__ _ISR_lock_ISR_disable( &lock_context ); status = _Scheduler_Set_affinity( @@ -222,7 +226,6 @@ int pthread_create( api = the_thread->API_Extensions[ THREAD_API_POSIX ]; _POSIX_Threads_Copy_attributes( &api->Attributes, the_attr ); - api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; |