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/mrspimpl.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/mrspimpl.h')
-rw-r--r-- | cpukit/score/include/rtems/score/mrspimpl.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpukit/score/include/rtems/score/mrspimpl.h b/cpukit/score/include/rtems/score/mrspimpl.h index 1be320236a..f2570eb7fc 100644 --- a/cpukit/score/include/rtems/score/mrspimpl.h +++ b/cpukit/score/include/rtems/score/mrspimpl.h @@ -218,7 +218,7 @@ RTEMS_INLINE_ROUTINE MRSP_Status _MRSP_Wait_for_ownership( { MRSP_Status status; MRSP_Rival rival; - bool initial_life_protection; + Thread_Life_state life_state; Per_CPU_Control *cpu_self; ISR_lock_Context giant_lock_context; ISR_Level level; @@ -256,7 +256,7 @@ RTEMS_INLINE_ROUTINE MRSP_Status _MRSP_Wait_for_ownership( _ISR_Enable_without_giant( level ); } - initial_life_protection = _Thread_Set_life_protection( true ); + life_state = _Thread_Set_life_protection( THREAD_LIFE_PROTECTED ); _Thread_Dispatch_enable( cpu_self ); _Assert( _Debug_Is_thread_dispatching_allowed() ); @@ -266,7 +266,7 @@ RTEMS_INLINE_ROUTINE MRSP_Status _MRSP_Wait_for_ownership( status = rival.status; } while ( status == MRSP_WAIT_FOR_OWNERSHIP ); - _Thread_Set_life_protection( initial_life_protection ); + _Thread_Set_life_protection( life_state ); if ( timeout > 0 ) { _ISR_Disable_without_giant( level ); |