21 #ifndef _RTEMS_SCORE_SCHEDULER_H 22 #define _RTEMS_SCORE_SCHEDULER_H 72 void ( *update_priority )(
90 #if defined(RTEMS_SMP) 101 bool ( *ask_for_help )(
115 void ( *reconsider_help_request )(
130 void ( *withdraw_node )(
173 void ( *add_processor )(
193 void ( *node_initialize )(
204 void ( *release_job ) (
213 void ( *cancel_job ) (
224 void ( *start_idle )(
230 #if defined(RTEMS_SMP) 232 bool ( *set_affinity )(
236 const Processor_mask *
253 #if defined(RTEMS_SMP) 288 #if defined(RTEMS_SMP) 319 #if defined(RTEMS_SMP) 322 #define _Scheduler_Count ( (size_t) 1 ) 325 #if defined(RTEMS_SMP) 329 #define SCHEDULER_ASSIGN_DEFAULT UINT32_C(0x0) 334 #define SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL SCHEDULER_ASSIGN_DEFAULT 339 #define SCHEDULER_ASSIGN_PROCESSOR_MANDATORY UINT32_C(0x1) 402 #if defined(RTEMS_SMP) 462 #define SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELP \ 463 _Scheduler_default_Ask_for_help, \ 464 _Scheduler_default_Reconsider_help_request, \ 465 _Scheduler_default_Withdraw_node, \ 466 _Scheduler_default_Pin_or_unpin, \ 467 _Scheduler_default_Pin_or_unpin, \ 471 #define SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELP 574 #if defined(RTEMS_SMP) 592 const Processor_mask *affinity
595 #define SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY \ 596 , _Scheduler_default_Set_affinity 598 #define SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY 605 #define PRIORITY_MAXIMUM ( _Scheduler_Table[ 0 ].maximum_priority ) void _Scheduler_default_Withdraw_node(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node, Thread_Scheduler_state next_state)
Does nothing.
uint64_t Priority_Control
The thread priority control.
void _Scheduler_default_Release_job(const Scheduler_Control *scheduler, Thread_Control *the_thread, Priority_Node *priority_node, uint64_t deadline, Thread_queue_Context *queue_context)
Does nothing.
The scheduler operations.
Thread queue context for the thread queue methods.
The priority node to build up a priority aggregation.
Priority_Control _Scheduler_default_Map_priority(const Scheduler_Control *scheduler, Priority_Control priority)
Returns the scheduler internal thread priority mapped by SCHEDULER_PRIORITY_MAP().
bool _Scheduler_default_Ask_for_help(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Does nothing.
uint32_t name
The scheduler name.
bool is_non_preempt_mode_supported
True if the non-preempt mode for threads is supported by the scheduler, otherwise false...
void _Scheduler_default_Schedule(const Scheduler_Control *scheduler, Thread_Control *the_thread)
Does nothing.
bool _Scheduler_default_Set_affinity(const Scheduler_Control *scheduler, Thread_Control *thread, Scheduler_Node *node, const Processor_mask *affinity)
Checks if the processor set of the scheduler is the subset of the affinity set.
struct Scheduler_Context Scheduler_Context
Scheduler context.
const Scheduler_Assignment _Scheduler_Initial_assignments[]
The scheduler assignments.
uint32_t attributes
The scheduler assignment attributes.
#define ISR_LOCK_MEMBER(_designator)
Defines an ISR lock member.
Thread_Scheduler_state
The thread state with respect to the scheduler.
void _Scheduler_default_Node_destroy(const Scheduler_Control *scheduler, Scheduler_Node *node)
Does nothing.
Priority_Control maximum_priority
The maximum priority value of this scheduler.
Processor_mask Processors
Lock to protect this scheduler instance.
const Scheduler_Control _Scheduler_Table[]
This table contains the configured schedulers.
void _Scheduler_default_Node_initialize(const Scheduler_Control *scheduler, Scheduler_Node *node, Thread_Control *the_thread, Priority_Control priority)
Performs the scheduler base node initialization.
void _Scheduler_default_Pin_or_unpin(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node, struct Per_CPU_Control *cpu)
Does nothing in a single processor system, otherwise a fatal error is issued.
const Scheduler_Control * scheduler
The scheduler for this processor.
Scheduler_Operations Operations
The scheduler operations.
const size_t _Scheduler_Count
This constant contains the count of configured schedulers.
Scheduler node for per-thread data.
void _Scheduler_default_Tick(const Scheduler_Control *scheduler, Thread_Control *executing)
Performs tick operations depending on the CPU budget algorithm for each executing thread...
void _Scheduler_default_Cancel_job(const Scheduler_Control *scheduler, Thread_Control *the_thread, Priority_Node *priority_node, Thread_queue_Context *queue_context)
Does nothing.
void _Scheduler_default_Reconsider_help_request(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Does nothing.
Scheduler_Context * context
Reference to a statically allocated scheduler context.
Priority_Control _Scheduler_default_Unmap_priority(const Scheduler_Control *scheduler, Priority_Control priority)
Returns the user visible thread priority unmapped by SCHEDULER_PRIORITY_UNMAP().
void _Scheduler_default_Start_idle(const Scheduler_Control *scheduler, Thread_Control *the_thread, struct Per_CPU_Control *cpu)
Starts an idle thread.
Constants and Structures Related with the Thread Control Block.