Index: c/src/lib/libbsp/sparc/shared/irq_asm.S
===================================================================
--- c/src/lib/libbsp/sparc/shared/irq_asm.S	(revision 35a3af7af839ceaf81472d715fc590ac9604ab36)
+++ c/src/lib/libbsp/sparc/shared/irq_asm.S	(revision 11b05f11d4d6d61717e345d20f492977b95ab131)
@@ -165,8 +165,8 @@
 
 #if defined(RTEMS_SMP)
-        ! Indicate that this context is no longer executing
+        ! The executing context no longer executes on this processor
         stb     %g0, [%o0 + SPARC_CONTEXT_CONTROL_IS_EXECUTING_OFFSET]
 
-        ! Wait for context to stop execution if necessary
+        ! Wait for heir context to stop execution
 1:
         ldub    [%o1 + SPARC_CONTEXT_CONTROL_IS_EXECUTING_OFFSET], %g1
@@ -175,5 +175,5 @@
          mov    1, %g1
 
-        ! Indicate that this context is executing
+        ! The heir context executes now on this processor
         stb     %g1, [%o1 + SPARC_CONTEXT_CONTROL_IS_EXECUTING_OFFSET]
 #endif
Index: c/src/lib/libcpu/powerpc/new-exceptions/cpu.c
===================================================================
--- c/src/lib/libcpu/powerpc/new-exceptions/cpu.c	(revision 35a3af7af839ceaf81472d715fc590ac9604ab36)
+++ c/src/lib/libcpu/powerpc/new-exceptions/cpu.c	(revision 11b05f11d4d6d61717e345d20f492977b95ab131)
@@ -124,14 +124,8 @@
     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__
Index: c/src/lib/libcpu/powerpc/new-exceptions/cpu_asm.S
===================================================================
--- c/src/lib/libcpu/powerpc/new-exceptions/cpu_asm.S	(revision 35a3af7af839ceaf81472d715fc590ac9604ab36)
+++ c/src/lib/libcpu/powerpc/new-exceptions/cpu_asm.S	(revision 11b05f11d4d6d61717e345d20f492977b95ab131)
@@ -328,15 +328,10 @@
 
 #ifdef RTEMS_SMP
-	/* Indicate that this context is no longer executing */
+	/* The executing context no longer executes on this processor */
 	msync
 	li	r5, 0
 	stb	r5, PPC_CONTEXT_OFFSET_IS_EXECUTING(r3)
-#endif
-
-	/* Restore context from r4 */
-restore_context:
-
-#ifdef RTEMS_SMP
-	/* Wait for context to stop execution if necessary */
+
+	/* Wait for heir context to stop execution */
 1:
 	lbz	r5, PPC_CONTEXT_OFFSET_IS_EXECUTING(r4)
@@ -344,9 +339,12 @@
 	bne	1b
 
-	/* Indicate that this context is executing */
+	/* The heir context executes now on this processor */
 	li	r5, 1
 	stb	r5, PPC_CONTEXT_OFFSET_IS_EXECUTING(r4)
 	isync
 #endif
+
+	/* Restore context from r4 */
+restore_context:
 
 #ifdef __ALTIVEC__
Index: cpukit/score/cpu/arm/cpu.c
===================================================================
--- cpukit/score/cpu/arm/cpu.c	(revision 35a3af7af839ceaf81472d715fc590ac9604ab36)
+++ cpukit/score/cpu/arm/cpu.c	(revision 11b05f11d4d6d61717e345d20f492977b95ab131)
@@ -102,8 +102,4 @@
 #endif
 
-#ifdef RTEMS_SMP
-  the_context->is_executing = false;
-#endif
-
   if ( tls_area != NULL ) {
     _TLS_TCB_at_area_begin_initialize( tls_area );
Index: cpukit/score/cpu/arm/cpu_asm.S
===================================================================
--- cpukit/score/cpu/arm/cpu_asm.S	(revision 35a3af7af839ceaf81472d715fc590ac9604ab36)
+++ cpukit/score/cpu/arm/cpu_asm.S	(revision 11b05f11d4d6d61717e345d20f492977b95ab131)
@@ -69,8 +69,19 @@
 
 #ifdef RTEMS_SMP
-	/* Indicate that this context is no longer executing */
+	/* The executing context no longer executes on this processor */
 	dmb
 	mov	r3, #0
 	strb	r3, [r0, #ARM_CONTEXT_CONTROL_IS_EXECUTING_OFFSET]
+
+	/* Wait for heir context to stop execution */
+1:
+	ldrb	r3, [r1, #ARM_CONTEXT_CONTROL_IS_EXECUTING_OFFSET]
+	cmp	r3, #0
+	bne	1b
+
+	/* The heir context executes now on this processor */
+	dmb
+	mov	r3, #1
+	strb	r3, [r1, #ARM_CONTEXT_CONTROL_IS_EXECUTING_OFFSET]
 #endif
 
@@ -79,17 +90,4 @@
 #ifdef ARM_MULTILIB_HAS_LOAD_STORE_EXCLUSIVE
 	clrex
-#endif
-
-#ifdef RTEMS_SMP
-	/* Wait for context to stop execution if necessary */
-1:
-	ldrb	r3, [r1, #ARM_CONTEXT_CONTROL_IS_EXECUTING_OFFSET]
-	cmp	r3, #0
-	bne	1b
-
-	/* Indicate that this context is executing */
-	dmb
-	mov	r3, #1
-	strb	r3, [r1, #ARM_CONTEXT_CONTROL_IS_EXECUTING_OFFSET]
 #endif
 
Index: cpukit/score/cpu/arm/rtems/score/cpu.h
===================================================================
--- cpukit/score/cpu/arm/rtems/score/cpu.h	(revision 35a3af7af839ceaf81472d715fc590ac9604ab36)
+++ cpukit/score/cpu/arm/rtems/score/cpu.h	(revision 11b05f11d4d6d61717e345d20f492977b95ab131)
@@ -423,6 +423,18 @@
 
 #ifdef RTEMS_SMP
-  #define _CPU_Context_Get_is_executing( _context ) \
-    (_context)->is_executing
+  static inline bool _CPU_Context_Get_is_executing(
+    const Context_Control *context
+  )
+  {
+    return context->is_executing;
+  }
+
+  static inline void _CPU_Context_Set_is_executing(
+    Context_Control *context,
+    bool is_executing
+  )
+  {
+    context->is_executing = is_executing;
+  }
 #endif
 
Index: cpukit/score/cpu/i386/cpu_asm.S
===================================================================
--- cpukit/score/cpu/i386/cpu_asm.S	(revision 35a3af7af839ceaf81472d715fc590ac9604ab36)
+++ cpukit/score/cpu/i386/cpu_asm.S	(revision 11b05f11d4d6d61717e345d20f492977b95ab131)
@@ -59,5 +59,5 @@
 
 #ifdef RTEMS_SMP
-        /* Indicate that this context is no longer executing */
+        /* The executing context no longer executes on this processor */
         movb      $0, I386_CONTEXT_CONTROL_IS_EXECUTING_OFFSET(eax)
 #endif
@@ -65,7 +65,6 @@
         movl      HEIRCONTEXT_ARG(esp),eax /* eax = heir threads context */
 
-restore:
 #ifdef RTEMS_SMP
-        /* Wait for context to stop execution if necessary */
+        /* Wait for heir context to stop execution */
 1:
         movb      I386_CONTEXT_CONTROL_IS_EXECUTING_OFFSET(eax), bl
@@ -73,8 +72,9 @@
         jne       1b
 
-        /* Indicate that this context is executing */
+        /* The heir context executes now on this processor */
         movb      $1, I386_CONTEXT_CONTROL_IS_EXECUTING_OFFSET(eax)
 #endif
 
+restore:
         pushl     REG_EFLAGS(eax)          /* push eflags */
         popf                               /* restore eflags */
Index: cpukit/score/cpu/i386/rtems/score/cpu.h
===================================================================
--- cpukit/score/cpu/i386/rtems/score/cpu.h	(revision 35a3af7af839ceaf81472d715fc590ac9604ab36)
+++ cpukit/score/cpu/i386/rtems/score/cpu.h	(revision 11b05f11d4d6d61717e345d20f492977b95ab131)
@@ -168,6 +168,18 @@
 
 #ifdef RTEMS_SMP
-  #define _CPU_Context_Get_is_executing( _context ) \
-    (_context)->is_executing
+  static inline bool _CPU_Context_Get_is_executing(
+    const Context_Control *context
+  )
+  {
+    return context->is_executing;
+  }
+
+  static inline void _CPU_Context_Set_is_executing(
+    Context_Control *context,
+    bool is_executing
+  )
+  {
+    context->is_executing = is_executing;
+  }
 #endif
 
@@ -455,10 +467,4 @@
 
 
-#ifdef RTEMS_SMP
-  #define _I386_Context_Initialize_is_executing( _the_context ) \
-    (_the_context)->is_executing = false
-#else
-  #define _I386_Context_Initialize_is_executing( _the_context )
-#endif
 
 #define _CPU_Context_Initialize( _the_context, _stack_base, _size, \
@@ -476,5 +482,4 @@
     (_the_context)->ebp     = (void *) 0; \
     (_the_context)->esp     = (void *) _stack; \
-    _I386_Context_Initialize_is_executing( _the_context ); \
   } while (0)
 
Index: cpukit/score/cpu/no_cpu/rtems/score/cpu.h
===================================================================
--- cpukit/score/cpu/no_cpu/rtems/score/cpu.h	(revision 35a3af7af839ceaf81472d715fc590ac9604ab36)
+++ cpukit/score/cpu/no_cpu/rtems/score/cpu.h	(revision 11b05f11d4d6d61717e345d20f492977b95ab131)
@@ -1597,8 +1597,28 @@
 
   /**
-   * @brief Macro to return the is executing field of the thread context.
+   * @brief Gets the is executing indicator of the thread context.
+   *
+   * @param[in] context The context.
    */
-  #define _CPU_Context_Get_is_executing( _context ) \
-    ( ( _context )->is_executing )
+  static inline bool _CPU_Context_Get_is_executing(
+    const Context_Control *context
+  )
+  {
+    return context->is_executing;
+  }
+
+  /**
+   * @brief Sets the is executing indicator of the thread context.
+   *
+   * @param[in] context The context.
+   * @param[in] is_executing The new value for the is executing indicator.
+   */
+  static inline void _CPU_Context_Set_is_executing(
+    Context_Control *context,
+    bool is_executing
+  )
+  {
+    context->is_executing = is_executing;
+  }
 #endif
 
Index: cpukit/score/cpu/powerpc/rtems/score/cpu.h
===================================================================
--- cpukit/score/cpu/powerpc/rtems/score/cpu.h	(revision 35a3af7af839ceaf81472d715fc590ac9604ab36)
+++ cpukit/score/cpu/powerpc/rtems/score/cpu.h	(revision 11b05f11d4d6d61717e345d20f492977b95ab131)
@@ -344,6 +344,18 @@
 
 #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 */
Index: cpukit/score/cpu/sparc/cpu.c
===================================================================
--- cpukit/score/cpu/sparc/cpu.c	(revision 35a3af7af839ceaf81472d715fc590ac9604ab36)
+++ cpukit/score/cpu/sparc/cpu.c	(revision 11b05f11d4d6d61717e345d20f492977b95ab131)
@@ -331,8 +331,4 @@
     the_context->isr_dispatch_disable = 0;
 
-#if defined(RTEMS_SMP)
-  the_context->is_executing = false;
-#endif
-
   if ( tls_area != NULL ) {
     void *tcb = _TLS_TCB_after_TLS_block_initialize( tls_area );
Index: cpukit/score/cpu/sparc/rtems/score/cpu.h
===================================================================
--- cpukit/score/cpu/sparc/rtems/score/cpu.h	(revision 35a3af7af839ceaf81472d715fc590ac9604ab36)
+++ cpukit/score/cpu/sparc/rtems/score/cpu.h	(revision 11b05f11d4d6d61717e345d20f492977b95ab131)
@@ -489,6 +489,18 @@
 
 #ifdef RTEMS_SMP
-  #define _CPU_Context_Get_is_executing( _context ) \
-    (_context)->is_executing
+  static inline bool _CPU_Context_Get_is_executing(
+    const Context_Control *context
+  )
+  {
+    return context->is_executing;
+  }
+
+  static inline void _CPU_Context_Set_is_executing(
+    Context_Control *context,
+    bool is_executing
+  )
+  {
+    context->is_executing = is_executing;
+  }
 #endif
 
Index: cpukit/score/src/threadinitialize.c
===================================================================
--- cpukit/score/src/threadinitialize.c	(revision 35a3af7af839ceaf81472d715fc590ac9604ab36)
+++ cpukit/score/src/threadinitialize.c	(revision 11b05f11d4d6d61717e345d20f492977b95ab131)
@@ -185,4 +185,5 @@
   the_thread->is_in_the_air           = false;
   the_thread->scheduler               = scheduler;
+  _CPU_Context_Set_is_executing( &the_thread->Registers, false );
 #endif
 
Index: testsuites/sptests/spcontext01/init.c
===================================================================
--- testsuites/sptests/spcontext01/init.c	(revision 35a3af7af839ceaf81472d715fc590ac9604ab36)
+++ testsuites/sptests/spcontext01/init.c	(revision 11b05f11d4d6d61717e345d20f492977b95ab131)
@@ -161,4 +161,30 @@
 }
 
+static void test_context_is_executing(void)
+{
+#if defined(RTEMS_SMP)
+  Context_Control context;
+  bool is_executing;
+
+  memset(&context, 0, sizeof(context));
+
+  is_executing = _CPU_Context_Get_is_executing(&context);
+  rtems_test_assert(!is_executing);
+
+  _CPU_Context_Set_is_executing(&context, true);
+  is_executing = _CPU_Context_Get_is_executing(&context);
+  rtems_test_assert(is_executing);
+
+  _CPU_Context_Set_is_executing(&context, false);
+  is_executing = _CPU_Context_Get_is_executing(&context);
+  rtems_test_assert(!is_executing);
+
+  _CPU_Context_Set_is_executing(&context, true);
+  _CPU_Context_Initialize(&context, NULL, 0, 0, NULL, false, NULL);
+  is_executing = _CPU_Context_Get_is_executing(&context);
+  rtems_test_assert(is_executing);
+#endif
+}
+
 static void Init(rtems_task_argument arg)
 {
@@ -167,4 +193,5 @@
   TEST_BEGIN();
 
+  test_context_is_executing();
   test(self);
 
