diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-12 16:32:27 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-20 07:49:37 +0200 |
commit | 9949d8a7d042da7ba53516300db5c34c8b9c8a31 (patch) | |
tree | 614aded79bd69e1134dc1b83711b0636ca8e044d /cpukit/score/include/rtems/score/threadimpl.h | |
parent | score: Delete unused variable (diff) | |
download | rtems-9949d8a7d042da7ba53516300db5c34c8b9c8a31.tar.bz2 |
score: Add Thread_Change_life()
Add _Thread_Change_life_locked() as a general function to alter the
thread life state. Use it to implement _Thread_Set_life_protection() as
a first step.
Update #2555.
Update #2626.
Diffstat (limited to 'cpukit/score/include/rtems/score/threadimpl.h')
-rw-r--r-- | cpukit/score/include/rtems/score/threadimpl.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h index be2095e023..e68f1191f8 100644 --- a/cpukit/score/include/rtems/score/threadimpl.h +++ b/cpukit/score/include/rtems/score/threadimpl.h @@ -198,7 +198,7 @@ bool _Thread_Restart( void _Thread_Yield( Thread_Control *executing ); -bool _Thread_Set_life_protection( bool protect ); +Thread_Life_state _Thread_Set_life_protection( Thread_Life_state state ); /** * @brief Kills all zombie threads in the system. @@ -934,11 +934,11 @@ RTEMS_INLINE_ROUTINE bool _Thread_Is_life_terminating( return ( life_state & THREAD_LIFE_TERMINATING ) != 0; } -RTEMS_INLINE_ROUTINE bool _Thread_Is_life_protected( +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 ) == 0; } RTEMS_INLINE_ROUTINE bool _Thread_Is_life_changing( |