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/score/include/rtems/score/threadimpl.h | |
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/score/include/rtems/score/threadimpl.h')
-rw-r--r-- | cpukit/score/include/rtems/score/threadimpl.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h index e77352389c..cdd7f9b300 100644 --- a/cpukit/score/include/rtems/score/threadimpl.h +++ b/cpukit/score/include/rtems/score/threadimpl.h @@ -217,7 +217,11 @@ Thread_Life_state _Thread_Set_life_protection( Thread_Life_state state ); */ void _Thread_Kill_zombies( void ); -void _Thread_Exit( Thread_Control *executing ); +void _Thread_Exit( + Thread_Control *executing, + Thread_Life_state set, + void *exit_value +); void _Thread_Join( Thread_Control *the_thread, @@ -226,7 +230,11 @@ void _Thread_Join( ISR_lock_Context *lock_context ); -void _Thread_Cancel( Thread_Control *the_thread, Thread_Control *executing ); +void _Thread_Cancel( + Thread_Control *the_thread, + Thread_Control *executing, + void *exit_value +); /** * @brief Closes the thread. @@ -950,6 +958,14 @@ RTEMS_INLINE_ROUTINE bool _Thread_Is_life_changing( & ( THREAD_LIFE_RESTARTING | THREAD_LIFE_TERMINATING ) ) != 0; } +RTEMS_INLINE_ROUTINE bool _Thread_Is_joinable( + const Thread_Control *the_thread +) +{ + _Assert( _Thread_State_is_owner( the_thread ) ); + return ( the_thread->Life.state & THREAD_LIFE_DETACHED ) == 0; +} + /** * @brief Returns true if the thread owns resources, and false otherwise. * |