diff options
Diffstat (limited to 'cpukit/score/include/rtems')
-rw-r--r-- | cpukit/score/include/rtems/score/thread.h | 1 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/threadimpl.h | 9 |
2 files changed, 9 insertions, 1 deletions
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h index 352fb2e434..8672fddfd2 100644 --- a/cpukit/score/include/rtems/score/thread.h +++ b/cpukit/score/include/rtems/score/thread.h @@ -526,6 +526,7 @@ typedef enum { THREAD_LIFE_PROTECTED = 0x1, THREAD_LIFE_RESTARTING = 0x2, THREAD_LIFE_TERMINATING = 0x4, + THREAD_LIFE_CHANGE_DEFERRED = 0x8, THREAD_LIFE_DETACHED = 0x10 } Thread_Life_state; 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( |