diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-13 10:28:14 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-20 07:49:39 +0200 |
commit | da82656065d09f7b6aa411ba361287afdd787204 (patch) | |
tree | 3a17cae7059c89d111642cb27a1cf55ded61f604 /cpukit/score/include/rtems/score/threadimpl.h | |
parent | score: Avoid Giant lock for _Thread_Start() (diff) | |
download | rtems-da82656065d09f7b6aa411ba361287afdd787204.tar.bz2 |
posix: Rework thread cancellation
Add Thread_Life_state::THREAD_LIFE_CHANGE_DEFERRED and rework the POSIX
thread cancellation to use the thread life states.
Update #2555.
Update #2626.
Diffstat (limited to 'cpukit/score/include/rtems/score/threadimpl.h')
-rw-r--r-- | cpukit/score/include/rtems/score/threadimpl.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h index 6f97ca9866..549ca7ac35 100644 --- a/cpukit/score/include/rtems/score/threadimpl.h +++ b/cpukit/score/include/rtems/score/threadimpl.h @@ -205,6 +205,12 @@ bool _Thread_Restart_other( void _Thread_Yield( Thread_Control *executing ); +Thread_Life_state _Thread_Change_life( + Thread_Life_state clear, + Thread_Life_state set, + Thread_Life_state ignore +); + Thread_Life_state _Thread_Set_life_protection( Thread_Life_state state ); /** @@ -933,7 +939,8 @@ RTEMS_INLINE_ROUTINE bool _Thread_Is_life_change_allowed( Thread_Life_state life_state ) { - return ( life_state & THREAD_LIFE_PROTECTED ) == 0; + return ( life_state + & ( THREAD_LIFE_PROTECTED | THREAD_LIFE_CHANGE_DEFERRED ) ) == 0; } RTEMS_INLINE_ROUTINE bool _Thread_Is_life_changing( |