18 #ifndef _RTEMS_SCORE_SMPIMPL_H 19 #define _RTEMS_SCORE_SMPIMPL_H 43 #define SMP_MESSAGE_SHUTDOWN 0x1UL 50 #define SMP_MESSAGE_PERFORM_JOBS 0x2UL 56 SMP_FATAL_BOOT_PROCESSOR_NOT_ASSIGNED_TO_SCHEDULER,
57 SMP_FATAL_MANDATORY_PROCESSOR_NOT_PRESENT,
58 SMP_FATAL_MULTITASKING_START_ON_INVALID_PROCESSOR,
59 SMP_FATAL_MULTITASKING_START_ON_UNASSIGNED_PROCESSOR,
61 SMP_FATAL_SHUTDOWN_RESPONSE,
62 SMP_FATAL_START_OF_MANDATORY_PROCESSOR_FAILED,
63 SMP_FATAL_SCHEDULER_PIN_OR_UNPIN_NOT_SUPPORTED,
64 SMP_FATAL_WRONG_CPU_STATE_TO_PERFORM_JOBS
82 #if defined( RTEMS_SMP ) 85 #define _SMP_Handler_initialize() \ 89 #if defined( RTEMS_SMP ) 99 extern Processor_mask _SMP_Online_processors;
127 void _SMP_Start_multitasking_on_secondary_processor(
138 static inline long unsigned _SMP_Inter_processor_interrupt_handler(
150 message = _Atomic_Exchange_ulong(
158 _SMP_Fatal( SMP_FATAL_SHUTDOWN_RESPONSE );
163 _Per_CPU_Perform_jobs( cpu_self );
178 bool _SMP_Should_start_processor( uint32_t cpu_index );
188 void _SMP_Send_message( uint32_t cpu_index,
unsigned long message );
195 void _SMP_Send_message_broadcast(
207 void _SMP_Send_message_multicast(
208 const Processor_mask *targets,
212 typedef void ( *SMP_Action_handler )(
void *arg );
227 void _SMP_Multicast_action(
228 const Processor_mask *targets,
229 SMP_Action_handler handler,
243 void _SMP_Broadcast_action(
244 SMP_Action_handler handler,
258 void _SMP_Othercast_action(
259 SMP_Action_handler handler,
272 void _SMP_Unicast_action(
274 SMP_Action_handler handler,
284 void _SMP_Synchronize(
void );
292 #if defined( RTEMS_SMP ) 295 #define _SMP_Request_start_multitasking() \ 306 #if defined( RTEMS_SMP ) 309 #define _SMP_Request_shutdown() \ 320 #if defined(RTEMS_SMP) 321 return &_SMP_Online_processors;
323 return &_Processor_mask_The_one_and_only;
#define _SMP_Handler_initialize()
Initializes SMP Handler.
Definition: smpimpl.h:85
Definition: media-server.c:33
RTEMS_INLINE_ROUTINE const Processor_mask * _SMP_Get_online_processors(void)
Gets all online processors.
Definition: smpimpl.h:318
Fatal source of SMP domain.
Definition: interr.h:126
#define _SMP_Processor_configured_maximum
The configured processor maximum.
Definition: smp.h:49
void _Terminate(Internal_errors_Source the_source, Internal_errors_t the_error) RTEMS_NO_RETURN
Initiates system termination.
Definition: interr.c:31
#define RTEMS_NO_RETURN
Definition: basedefs.h:102
#define _SMP_Request_shutdown()
Requests a shutdown of all processors.
Definition: smpimpl.h:309
#define _SMP_Request_start_multitasking()
Requests a multitasking start on all configured and available processors.
Definition: smpimpl.h:295
SuperCore SMP Support API.
#define SMP_MESSAGE_PERFORM_JOBS
SMP message to perform per-processor jobs.
Definition: smpimpl.h:50
Per CPU Core Structure.
Definition: percpu.h:347
#define SMP_MESSAGE_SHUTDOWN
SMP message to request a processor shutdown.
Definition: smpimpl.h:43
volatile bool dispatch_necessary
This is set to true when this processor needs to run the thread dispatcher.
Definition: percpu.h:400
Definition: inftrees.h:24
RTEMS_INLINE_ROUTINE const bool _SMP_Need_inter_processor_interrupts(void)
Indicate if inter-processor interrupts are needed.
Definition: smpimpl.h:333
#define RTEMS_PREDICT_FALSE(_exp)
Returns the value of the specified integral expression and tells the compiler that the predicted valu...
Definition: basedefs.h:388
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:66
SMP_Fatal_code
SMP fatal codes.
Definition: smpimpl.h:55