18 #ifndef _RTEMS_SCORE_SMPIMPL_H 19 #define _RTEMS_SCORE_SMPIMPL_H 44 #define SMP_MESSAGE_SHUTDOWN 0x1UL 51 #define SMP_MESSAGE_TEST 0x2UL 58 #define SMP_MESSAGE_MULTICAST_ACTION 0x4UL 68 #define SMP_MESSAGE_CLOCK_TICK 0x8UL 74 SMP_FATAL_BOOT_PROCESSOR_NOT_ASSIGNED_TO_SCHEDULER,
75 SMP_FATAL_MANDATORY_PROCESSOR_NOT_PRESENT,
76 SMP_FATAL_MULTITASKING_START_ON_INVALID_PROCESSOR,
77 SMP_FATAL_MULTITASKING_START_ON_UNASSIGNED_PROCESSOR,
79 SMP_FATAL_SHUTDOWN_RESPONSE,
80 SMP_FATAL_START_OF_MANDATORY_PROCESSOR_FAILED,
81 SMP_FATAL_SCHEDULER_PIN_OR_UNPIN_NOT_SUPPORTED
84 static inline void _SMP_Fatal( SMP_Fatal_code
code )
94 #if defined( RTEMS_SMP ) 97 #define _SMP_Handler_initialize() \ 101 #if defined( RTEMS_SMP ) 111 extern Processor_mask _SMP_Online_processors;
139 void _SMP_Start_multitasking_on_secondary_processor(
143 typedef void ( *SMP_Test_message_handler )(
Per_CPU_Control *cpu_self );
145 extern SMP_Test_message_handler _SMP_Test_message_handler;
153 static inline void _SMP_Set_test_message_handler(
154 SMP_Test_message_handler handler
157 _SMP_Test_message_handler = handler;
163 void _SMP_Multicast_actions_process(
void );
170 static inline long unsigned _SMP_Inter_processor_interrupt_handler(
182 message = _Atomic_Exchange_ulong(
190 _SMP_Fatal( SMP_FATAL_SHUTDOWN_RESPONSE );
195 ( *_SMP_Test_message_handler )( cpu_self );
199 _SMP_Multicast_actions_process();
215 bool _SMP_Should_start_processor( uint32_t cpu_index );
225 void _SMP_Send_message( uint32_t cpu_index,
unsigned long message );
232 void _SMP_Send_message_broadcast(
233 unsigned long message
244 void _SMP_Send_message_multicast(
245 const Processor_mask *targets,
246 unsigned long message
249 typedef void ( *SMP_Action_handler )(
void *arg );
261 void _SMP_Multicast_action(
262 const size_t setsize,
263 const cpu_set_t *cpus,
264 SMP_Action_handler handler,
286 bool _SMP_Before_multitasking_action(
288 SMP_Action_handler handler,
307 bool _SMP_Before_multitasking_action_broadcast(
308 SMP_Action_handler handler,
318 #if defined( RTEMS_SMP ) 321 #define _SMP_Request_start_multitasking() \ 332 #if defined( RTEMS_SMP ) 335 #define _SMP_Request_shutdown() \ 341 #if defined(RTEMS_SMP) 342 return &_SMP_Online_processors;
344 return &_Processor_mask_The_one_and_only;
SuperCore SMP Support API.
Definition: media-server.c:33
Fatal source of SMP domain.
Definition: interr.h:121
#define RTEMS_PREDICT_FALSE(_exp)
Returns the value of the specified integral expression and tells the compiler that the predicted valu...
Definition: basedefs.h:359
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:65
#define SMP_MESSAGE_SHUTDOWN
SMP message to request a processor shutdown.
Definition: smpimpl.h:44
#define _SMP_Handler_initialize()
Initialize SMP Handler.
Definition: smpimpl.h:97
void _Terminate(Internal_errors_Source the_source, Internal_errors_t the_error) RTEMS_NO_RETURN
Initiates system termination.
Definition: interr.c:30
Per CPU Core Structure.
Definition: percpu.h:290
#define SMP_MESSAGE_MULTICAST_ACTION
SMP message to request a multicast action.
Definition: smpimpl.h:58
#define _SMP_Request_shutdown()
Requests a shutdown of all processors.
Definition: smpimpl.h:335
#define RTEMS_NO_RETURN
Definition: basedefs.h:101
volatile bool dispatch_necessary
This is set to true when this processor needs to run the thread dispatcher.
Definition: percpu.h:343
Definition: inftrees.h:24
SMP_Fatal_code
SMP fatal codes.
Definition: smpimpl.h:73
#define SMP_MESSAGE_TEST
SMP message to request a test handler invocation.
Definition: smpimpl.h:51
#define _SMP_Request_start_multitasking()
Requests a multitasking start on all configured and available processors.
Definition: smpimpl.h:321