From 9949d8a7d042da7ba53516300db5c34c8b9c8a31 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 12 May 2016 16:32:27 +0200 Subject: 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. --- cpukit/score/include/rtems/score/mrspimpl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cpukit/score/include/rtems/score/mrspimpl.h') 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 ); -- cgit v1.2.3