21#ifndef _RTEMS_SCORE_SCHEDULER_H
22#define _RTEMS_SCORE_SCHEDULER_H
77 void ( *update_priority )(
106 bool ( *ask_for_help )(
120 void ( *reconsider_help_request )(
135 void ( *withdraw_node )(
139 Thread_Scheduler_state next_state
178 void ( *add_processor )(
198 void ( *node_initialize )(
209 void ( *release_job ) (
218 void ( *cancel_job ) (
229 void ( *start_idle )(
235#if defined(RTEMS_SMP)
237 bool ( *set_affinity )(
241 const Processor_mask *
258#if defined(RTEMS_SMP)
262 Processor_mask Processors;
293#if defined(RTEMS_SMP)
298 bool is_non_preempt_mode_supported;
322#if defined(RTEMS_SMP)
325 #define _Scheduler_Count ( (size_t) 1 )
328#if defined(RTEMS_SMP)
332 #define SCHEDULER_ASSIGN_DEFAULT UINT32_C(0x0)
337 #define SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL SCHEDULER_ASSIGN_DEFAULT
342 #define SCHEDULER_ASSIGN_PROCESSOR_MANDATORY UINT32_C(0x1)
363 } Scheduler_Assignment;
374 extern const Scheduler_Assignment _Scheduler_Initial_assignments[];
405#if defined(RTEMS_SMP)
415 bool _Scheduler_default_Ask_for_help(
428 void _Scheduler_default_Reconsider_help_request(
442 void _Scheduler_default_Withdraw_node(
446 Thread_Scheduler_state next_state
458 void _Scheduler_default_Pin_or_unpin(
465 #define SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELP \
466 _Scheduler_default_Ask_for_help, \
467 _Scheduler_default_Reconsider_help_request, \
468 _Scheduler_default_Withdraw_node, \
469 _Scheduler_default_Pin_or_unpin, \
470 _Scheduler_default_Pin_or_unpin, \
474 #define SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELP
577#if defined(RTEMS_SMP)
591 bool _Scheduler_default_Set_affinity(
595 const Processor_mask *affinity
598 #define SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY \
599 , _Scheduler_default_Set_affinity
601 #define SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY
608#define PRIORITY_MAXIMUM ( _Scheduler_Table[ 0 ].maximum_priority )
#define ISR_LOCK_MEMBER(_designator)
Defines an ISR lock member.
Definition: isrlock.h:89
uint64_t Priority_Control
The thread priority control.
Definition: priority.h:70
struct Scheduler_Context Scheduler_Context
Scheduler context.
#define _Scheduler_Count
Count of registered schedulers.
Definition: scheduler.h:325
void _Scheduler_default_Tick(const Scheduler_Control *scheduler, Thread_Control *executing)
Performs tick operations depending on the CPU budget algorithm for each executing thread.
Definition: schedulerdefaulttick.c:27
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.
Definition: schedulerdefaultreleasejob.c:24
void _Scheduler_default_Node_destroy(const Scheduler_Control *scheduler, Scheduler_Node *node)
Does nothing.
Definition: schedulerdefaultnodedestroy.c:24
const Scheduler_Control _Scheduler_Table[]
Registered 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.
Definition: schedulerdefaultnodeinit.c:24
Priority_Control _Scheduler_default_Map_priority(const Scheduler_Control *scheduler, Priority_Control priority)
Returns the scheduler internal thread priority mapped by SCHEDULER_PRIORITY_MAP().
Definition: schedulerdefaultmappriority.c:15
void _Scheduler_default_Schedule(const Scheduler_Control *scheduler, Thread_Control *the_thread)
Does nothing.
Definition: schedulerdefaultschedule.c:15
Priority_Control _Scheduler_default_Unmap_priority(const Scheduler_Control *scheduler, Priority_Control priority)
Returns the user visible thread priority unmapped by SCHEDULER_PRIORITY_UNMAP().
Definition: schedulerdefaultmappriority.c:23
void _Scheduler_default_Cancel_job(const Scheduler_Control *scheduler, Thread_Control *the_thread, Priority_Node *priority_node, Thread_queue_Context *queue_context)
Does nothing.
Definition: schedulerdefaultreleasejob.c:39
void _Scheduler_default_Start_idle(const Scheduler_Control *scheduler, Thread_Control *the_thread, struct Per_CPU_Control *cpu)
Starts an idle thread.
Definition: schedulerdefaultstartidle.c:15
Constants and Structures Related with the Thread Control Block.
Per CPU Core Structure.
Definition: percpu.h:347
The priority node to build up a priority aggregation.
Definition: priority.h:98
Scheduler context.
Definition: scheduler.h:252
Scheduler node for per-thread data.
Definition: schedulernode.h:79
The scheduler operations.
Definition: scheduler.h:48
Thread queue context for the thread queue methods.
Definition: threadq.h:198
Scheduler control.
Definition: scheduler.h:269
Scheduler_Context * context
Reference to a statically allocated scheduler context.
Definition: scheduler.h:273
uint32_t name
The scheduler name.
Definition: scheduler.h:291
Scheduler_Operations Operations
The scheduler operations.
Definition: scheduler.h:278
Priority_Control maximum_priority
The maximum priority value of this scheduler.
Definition: scheduler.h:286