diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-06-14 09:14:31 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-30 09:53:25 +0200 |
commit | d5ef7ae2a36bee532702d609f1dbb209cc47dd29 (patch) | |
tree | fe23444d0b02c06e7447ab169c88f7a16258bf5f /cpukit/score/include | |
parent | score: Move _Thread_Dispatch_if_necessary() (diff) | |
download | rtems-d5ef7ae2a36bee532702d609f1dbb209cc47dd29.tar.bz2 |
smp: Delete _SMP_Request_other_cores_to_dispatch()
Use an event triggered unicast to inform remote processors about a
necessary thread dispatch instead.
Diffstat (limited to 'cpukit/score/include')
-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__) |