18 #ifndef _RTEMS_SCORE_THREADDISPATCH_H 19 #define _RTEMS_SCORE_THREADDISPATCH_H 35 #if defined(RTEMS_SMP) || ( CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE ) 44 #define RTEMS_SCORE_ROBUST_THREAD_DISPATCH 59 #if defined(RTEMS_SMP) 65 enabled = _Thread_Dispatch_disable_level == 0;
67 #if defined(RTEMS_SMP) 81 return _Thread_Dispatch_disable_level;
91 _Thread_Dispatch_disable_level = 1;
157 uint32_t disable_level;
196 #if defined( RTEMS_SMP ) || defined( RTEMS_PROFILING ) 202 #if defined( RTEMS_SMP ) || defined( RTEMS_PROFILING ) 240 #if defined( RTEMS_SMP ) 241 if ( cpu_self == cpu_target ) {
244 _Atomic_Fetch_or_ulong( &cpu_target->
message, 0, ATOMIC_ORDER_RELEASE );
245 _CPU_SMP_Send_interrupt( _Per_CPU_Get_index( cpu_target ) );
#define _ISR_Local_disable(_level)
Disables interrupts on this processor.
void _Thread_Dispatch_direct(Per_CPU_Control *cpu_self)
Directly do a thread dispatch.
static __inline__ void _Thread_Dispatch_initialization(void)
Thread dispatch initialization.
#define _ISR_lock_ISR_enable(_context)
Restores the saved interrupt state of the ISR lock context.
void _Thread_Do_dispatch(Per_CPU_Control *cpu_self, ISR_Level level)
Performs a thread dispatch on the current processor.
static __inline__ Per_CPU_Control * _Thread_Dispatch_disable_with_CPU(Per_CPU_Control *cpu_self, const ISR_lock_Context *lock_context)
Disables thread dispatching inside a critical section (interrupts disabled) with the current processo...
static __inline__ Per_CPU_Control * _Thread_Dispatch_disable_critical(const ISR_lock_Context *lock_context)
Disables thread dispatching inside a critical section (interrupts disabled).
static void _Profiling_Thread_dispatch_disable_critical(Per_CPU_Control *cpu, uint32_t previous_thread_dispatch_disable_level, const ISR_lock_Context *lock_context)
Disables the thread dispatch.
static __inline__ bool _Thread_Dispatch_is_enabled(void)
Indicates if the executing thread is inside a thread dispatch critical section.
#define _ISR_Local_enable(_level)
Enables interrupts on this processor.
static __inline__ uint32_t _Thread_Dispatch_get_disable_level(void)
Gets thread dispatch disable level.
static __inline__ void _Thread_Dispatch_request(Per_CPU_Control *cpu_self, Per_CPU_Control *cpu_target)
Requests a thread dispatch on the target processor.
void _Thread_Dispatch_enable(Per_CPU_Control *cpu_self)
Enables thread dispatching.
volatile bool dispatch_necessary
This is set to true when this processor needs to run the thread dispatcher.
static __inline__ Per_CPU_Control * _Thread_Dispatch_disable(void)
Disables thread dispatching.
void _Thread_Dispatch(void)
Performs a thread dispatch if necessary.
volatile uint32_t thread_dispatch_disable_level
The thread dispatch critical section nesting counter which is used to prevent context switches at ino...
#define _ISR_lock_ISR_disable(_context)
Disables interrupts and saves the previous interrupt state in the ISR lock context.
Atomic_Ulong message
Bit field for SMP messages.
Local ISR lock context for acquire and release pairs.
#define RTEMS_INLINE_ROUTINE
Gives a hint to the compiler in a function declaration to inline this function.
static __inline__ void _Thread_Dispatch_unnest(Per_CPU_Control *cpu_self)
Unnests thread dispatching.
#define _Assert(_e)
Assertion similar to assert() controlled via RTEMS_DEBUG instead of NDEBUG.