diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-02-18 13:40:39 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-06 09:43:57 +0100 |
commit | 7336be9d78266adfb540170e5105caf8eb003d2f (patch) | |
tree | 5dc7ab7a5c3c33c7e007a8e8e48cb1167187b0ca /cpukit/score/include/rtems/score/smpimpl.h | |
parent | bsp/leon3: Unmask IPI only on secondary processor (diff) | |
download | rtems-7336be9d78266adfb540170e5105caf8eb003d2f.tar.bz2 |
score: SMP initialization and shutdown changes
Rename _SMP_Request_other_cores_to_perform_first_context_switch() into
_SMP_Request_start_multitasking() since this requests now a multitasking
start on all configured and available processors. The name corresponds
_Thread_Start_multitasking() and
_SMP_Start_multitasking_on_secondary_processor() actions issued in
response to this request. Move in source file to right place.
Rename PER_CPU_STATE_READY_TO_BEGIN_MULTITASKING into
PER_CPU_STATE_READY_TO_START_MULTITASKING.
Rename PER_CPU_STATE_BEGIN_MULTITASKING into
PER_CPU_STATE_REQUEST_START_MULTITASKING.
Rename _SMP_Request_other_cores_to_shutdown() into
_SMP_Request_shutdown().
Add a per-CPU state lock to protect all changes. This was necessary to
offer a controlled shutdown of the system (atomic read/writes alone are
not sufficient for this kind of synchronization).
Add documentation for Per_CPU_State.
Delete debug output.
New tests smptests/smpfatal01 and smptests/smpfatal02.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/include/rtems/score/smpimpl.h | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/cpukit/score/include/rtems/score/smpimpl.h b/cpukit/score/include/rtems/score/smpimpl.h index d68af43916..da08cf54e8 100644 --- a/cpukit/score/include/rtems/score/smpimpl.h +++ b/cpukit/score/include/rtems/score/smpimpl.h @@ -108,8 +108,6 @@ static inline void _SMP_Inter_processor_interrupt_handler( void ) _Per_CPU_Release_and_ISR_enable( self_cpu, level ); if ( ( message & SMP_MESSAGE_SHUTDOWN ) != 0 ) { - _Per_CPU_Change_state( self_cpu, PER_CPU_STATE_SHUTDOWN ); - rtems_fatal( RTEMS_FATAL_SOURCE_SMP, SMP_FATAL_SHUTDOWN ); /* does not continue past here */ } @@ -143,27 +141,27 @@ void _SMP_Broadcast_message( #endif /* defined( RTEMS_SMP ) */ /** - * @brief Request other cores to perform first context switch. - * - * Send message to other cores requesting them to perform - * their first context switch operation. + * @brief Requests a multitasking start on all configured and available + * processors. */ #if defined( RTEMS_SMP ) - void _SMP_Request_other_cores_to_perform_first_context_switch( void ); + void _SMP_Request_start_multitasking( void ); #else - #define _SMP_Request_other_cores_to_perform_first_context_switch() \ + #define _SMP_Request_start_multitasking() \ do { } while ( 0 ) #endif /** - * @brief Request other cores to shutdown. + * @brief Requests a shutdown of all processors. + * + * This function is a part of the system termination procedure. * - * Send message to other cores requesting them to shutdown. + * @see _Terminate(). */ #if defined( RTEMS_SMP ) - void _SMP_Request_other_cores_to_shutdown( void ); + void _SMP_Request_shutdown( void ); #else - #define _SMP_Request_other_cores_to_shutdown() \ + #define _SMP_Request_shutdown() \ do { } while ( 0 ) #endif |