diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-05-08 10:11:13 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-05-08 13:02:40 +0200 |
commit | 11b05f11d4d6d61717e345d20f492977b95ab131 (patch) | |
tree | 5f5bd2a21ea205ea0700d44718de7fcac8234fe7 /cpukit/score/cpu/powerpc/rtems | |
parent | doc: Use @dfn for glossary terms (diff) | |
download | rtems-11b05f11d4d6d61717e345d20f492977b95ab131.tar.bz2 |
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.
Diffstat (limited to 'cpukit/score/cpu/powerpc/rtems')
-rw-r--r-- | cpukit/score/cpu/powerpc/rtems/score/cpu.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/cpukit/score/cpu/powerpc/rtems/score/cpu.h b/cpukit/score/cpu/powerpc/rtems/score/cpu.h index 18a6770788..3cad329157 100644 --- a/cpukit/score/cpu/powerpc/rtems/score/cpu.h +++ b/cpukit/score/cpu/powerpc/rtems/score/cpu.h @@ -343,8 +343,20 @@ static inline ppc_context *ppc_get_context( const Context_Control *context ) ppc_get_context(_context)->gpr1 #ifdef RTEMS_SMP - #define _CPU_Context_Get_is_executing( _context ) \ - ppc_get_context(_context)->is_executing + static inline bool _CPU_Context_Get_is_executing( + const Context_Control *context + ) + { + return ppc_get_context(context)->is_executing; + } + + static inline void _CPU_Context_Set_is_executing( + Context_Control *context, + bool is_executing + ) + { + ppc_get_context(context)->is_executing = is_executing; + } #endif #endif /* ASM */ |