From 81f595760d1a5b85c7650c53957fc01fe17582c6 Mon Sep 17 00:00:00 2001 From: Jennifer Averett Date: Fri, 25 Jan 2008 20:14:45 +0000 Subject: 2008-01-25 Jennifer Averett * sapi/include/rtems/fatal.h, score/include/rtems/score/coremutex.h, score/include/rtems/score/interr.h, score/inline/rtems/score/thread.inl, score/src/coremutexseize.c: Modifications to aid in full path testing. --- cpukit/score/inline/rtems/score/thread.inl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'cpukit/score/inline') diff --git a/cpukit/score/inline/rtems/score/thread.inl b/cpukit/score/inline/rtems/score/thread.inl index 6f58652a2c..9ce734c773 100644 --- a/cpukit/score/inline/rtems/score/thread.inl +++ b/cpukit/score/inline/rtems/score/thread.inl @@ -19,6 +19,8 @@ #ifndef _RTEMS_SCORE_THREAD_INL #define _RTEMS_SCORE_THREAD_INL +#include + /** * @addtogroup ScoreThread * @{ @@ -32,7 +34,13 @@ RTEMS_INLINE_ROUTINE void _Thread_Stop_multitasking( void ) { - _Context_Switch( &_Thread_Executing->Registers, &_Thread_BSP_context ); + Context_Control context_area; + Context_Control *context_p = &context_area; + + if ( _System_state_Is_up(_System_state_Get ()) ) + context_p = &_Thread_Executing->Registers; + + _Context_Switch( context_p, &_Thread_BSP_context ); } /** -- cgit v1.2.3