38#ifndef _RTEMS_SCORE_THREADDISPATCH_H
39#define _RTEMS_SCORE_THREADDISPATCH_H
55#if defined(RTEMS_SMP) || ( CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE )
64#define RTEMS_SCORE_ROBUST_THREAD_DISPATCH
75static inline bool _Thread_Dispatch_is_enabled(
void)
85 enabled = _Thread_Dispatch_disable_level == 0;
99static inline uint32_t _Thread_Dispatch_get_disable_level(
void)
101 return _Thread_Dispatch_disable_level;
109static inline void _Thread_Dispatch_initialization(
void )
111 _Thread_Dispatch_disable_level = 1;
188 uint32_t disable_level;
191 _Profiling_Thread_dispatch_disable_critical(
214 return _Thread_Dispatch_disable_with_CPU( _Per_CPU_Get(), lock_context );
226#if defined( RTEMS_SMP ) || defined( RTEMS_PROFILING )
231 cpu_self = _Thread_Dispatch_disable_critical( &lock_context );
235 cpu_self = _Thread_Dispatch_disable_critical(
NULL );
267static inline void _Thread_Dispatch_request(
272#if defined( RTEMS_SMP )
273 if ( cpu_self == cpu_target ) {
276 _Atomic_Fetch_or_ulong( &cpu_target->message, 0, ATOMIC_ORDER_RELEASE );
277 _CPU_SMP_Send_interrupt( _Per_CPU_Get_index( cpu_target ) );
#define RTEMS_NO_RETURN
Tells the compiler in a function declaration that this function does not return.
Definition: basedefs.h:386
#define _Assert(_e)
Assertion similar to assert() controlled via RTEMS_DEBUG instead of NDEBUG and static analysis runs.
Definition: assert.h:96
#define _ISR_lock_ISR_enable(_context)
Restores the saved interrupt state of the ISR lock context.
Definition: isrlock.h:435
#define _ISR_lock_ISR_disable(_context)
Disables interrupts and saves the previous interrupt state in the ISR lock context.
Definition: isrlock.h:414
#define _ISR_Local_disable(_level)
Disables interrupts on this processor.
Definition: isrlevel.h:76
#define _ISR_Local_enable(_level)
Enables interrupts on this processor.
Definition: isrlevel.h:93
uint32_t ISR_Level
Definition: isrlevel.h:60
void _Thread_Dispatch(void)
Performs a thread dispatch if necessary.
Definition: threadplaindispatch.c:43
RTEMS_NO_RETURN void _Thread_Dispatch_direct_no_return(Per_CPU_Control *cpu_self)
Directly do a thread dispatch and do not return.
void _Thread_Dispatch_enable(Per_CPU_Control *cpu_self)
Enables thread dispatching.
void _Thread_Dispatch_direct(Per_CPU_Control *cpu_self)
Directly do a thread dispatch.
Definition: threaddispatch.c:359
void _Thread_Do_dispatch(Per_CPU_Control *cpu_self, ISR_Level level)
Performs a thread dispatch on the current processor.
Definition: threaddispatch.c:277
#define NULL
Requests a GPIO pin group configuration.
Definition: xil_types.h:54
This header file provides the interfaces of the ISR Locks.
This header file provides the interfaces of the Per-CPU Information.
This header file provides the interfaces of the Profiling Support.
Local ISR lock context for acquire and release pairs.
Definition: isrlock.h:81
Per CPU Core Structure.
Definition: percpu.h:384
volatile uint32_t thread_dispatch_disable_level
The thread dispatch critical section nesting counter which is used to prevent context switches at ino...
Definition: percpu.h:422
volatile bool dispatch_necessary
This is set to true when this processor needs to run the thread dispatcher.
Definition: percpu.h:437