forked from Imagelibrary/rtems
score: Fix CPU context usage on SMP
We must not alter the is executing indicator in _CPU_Context_Initialize() since this would cause an invalid state during a self restart. The is executing indicator must be valid at creation time since otherwise _Thread_Kill_zombies() uses an undefined value for not started threads. This could result in a system life lock.
This commit is contained in:
@@ -123,17 +123,11 @@ void _CPU_Context_Initialize(
|
||||
else
|
||||
msr_value &= ~PPC_MSR_FP;
|
||||
|
||||
memset( the_context, 0, sizeof( *the_context ) );
|
||||
|
||||
the_ppc_context = ppc_get_context( the_context );
|
||||
the_ppc_context->gpr1 = sp;
|
||||
the_ppc_context->msr = msr_value;
|
||||
the_ppc_context->lr = (uint32_t) entry_point;
|
||||
|
||||
#ifdef RTEMS_SMP
|
||||
the_ppc_context->is_executing = false;
|
||||
#endif
|
||||
|
||||
#ifdef __ALTIVEC__
|
||||
_CPU_Context_initialize_altivec( the_ppc_context );
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user