diff options
Diffstat (limited to 'cpukit/score/include/rtems/score')
-rw-r--r-- | cpukit/score/include/rtems/score/smp.h | 8 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/threadimpl.h | 15 |
2 files changed, 14 insertions, 9 deletions
diff --git a/cpukit/score/include/rtems/score/smp.h b/cpukit/score/include/rtems/score/smp.h index fedf9ab6d7..2c2b46ab32 100644 --- a/cpukit/score/include/rtems/score/smp.h +++ b/cpukit/score/include/rtems/score/smp.h @@ -96,14 +96,6 @@ void _SMP_Broadcast_message( void _SMP_Request_other_cores_to_perform_first_context_switch(void); /** - * @brief Request dispatch on other cores. - * - * Send message to other cores requesting them to perform - * a thread dispatch operation. - */ -void _SMP_Request_other_cores_to_dispatch(void); - -/** * @brief Request other cores to shutdown. * * Send message to other cores requesting them to shutdown. diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h index 7a48c2684b..f5a0ff9faa 100644 --- a/cpukit/score/include/rtems/score/threadimpl.h +++ b/cpukit/score/include/rtems/score/threadimpl.h @@ -634,8 +634,21 @@ RTEMS_INLINE_ROUTINE uint32_t _Thread_Get_global_exit_status( void ) RTEMS_INLINE_ROUTINE void _Thread_Signal_notification( Thread_Control *thread ) { - if ( _ISR_Is_in_progress() && _Thread_Is_executing( thread ) ) + if ( _ISR_Is_in_progress() && _Thread_Is_executing( thread ) ) { _Thread_Dispatch_necessary = true; + } else { +#if defined(RTEMS_SMP) + if ( thread->is_executing ) { + const Per_CPU_Control *cpu_of_executing = _Per_CPU_Get(); + Per_CPU_Control *cpu_of_thread = thread->cpu; + + if ( cpu_of_executing != cpu_of_thread ) { + cpu_of_thread->dispatch_necessary = true; + _Per_CPU_Send_interrupt( cpu_of_thread ); + } + } +#endif + } } #if !defined(__DYNAMIC_REENT__) |