19 #ifndef _RTEMS_SCORE_SCHEDULER_H 20 #define _RTEMS_SCORE_SCHEDULER_H 74 void ( *update_priority )(
92 #if defined(RTEMS_SMP) 103 bool ( *ask_for_help )(
105 Thread_Control *the_thread,
117 void ( *reconsider_help_request )(
119 Thread_Control *the_thread,
132 void ( *withdraw_node )(
134 Thread_Control *the_thread,
136 Thread_Scheduler_state next_state
149 Thread_Control *the_thread,
164 Thread_Control *the_thread,
175 void ( *add_processor )(
188 Thread_Control *( *remove_processor )(
195 void ( *node_initialize )(
206 void ( *release_job ) (
215 void ( *cancel_job ) (
226 void ( *start_idle )(
232 #if defined(RTEMS_SMP) 234 bool ( *set_affinity )(
238 const Processor_mask *
255 #if defined(RTEMS_SMP) 259 Processor_mask Processors;
311 #if defined(RTEMS_SMP) 314 #define _Scheduler_Count ( (size_t) 1 ) 317 #if defined(RTEMS_SMP) 321 #define SCHEDULER_ASSIGN_DEFAULT UINT32_C(0x0) 326 #define SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL SCHEDULER_ASSIGN_DEFAULT 331 #define SCHEDULER_ASSIGN_PROCESSOR_MANDATORY UINT32_C(0x1) 352 } Scheduler_Assignment;
363 extern const Scheduler_Assignment _Scheduler_Initial_assignments[];
394 #if defined(RTEMS_SMP) 404 bool _Scheduler_default_Ask_for_help(
417 void _Scheduler_default_Reconsider_help_request(
431 void _Scheduler_default_Withdraw_node(
435 Thread_Scheduler_state next_state
447 void _Scheduler_default_Pin_or_unpin(
454 #define SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELP \ 455 _Scheduler_default_Ask_for_help, \ 456 _Scheduler_default_Reconsider_help_request, \ 457 _Scheduler_default_Withdraw_node, \ 458 _Scheduler_default_Pin_or_unpin, \ 459 _Scheduler_default_Pin_or_unpin, \ 463 #define SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELP 566 #if defined(RTEMS_SMP) 578 bool _Scheduler_default_Set_affinity(
582 const Processor_mask *affinity
585 #define SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY \ 586 , _Scheduler_default_Set_affinity 588 #define SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY 595 #define PRIORITY_MAXIMUM ( _Scheduler_Table[ 0 ].maximum_priority ) Scheduler context.
Definition: scheduler.h:249
The scheduler operations.
Definition: scheduler.h:45
struct Scheduler_Context Scheduler_Context
Scheduler context.
Thread queue context for the thread queue methods.
Definition: threadq.h:193
The priority node to build up a priority aggregation.
Definition: priority.h:94
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
#define ISR_LOCK_MEMBER(_designator)
Defines an ISR lock member.
Definition: isrlock.h:89
uint32_t name
The scheduler name.
Definition: scheduler.h:288
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
uint64_t Priority_Control
The thread priority control.
Definition: priority.h:66
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
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
Per CPU Core Structure.
Definition: percpu.h:290
Priority_Control maximum_priority
The maximum priority value of this scheduler.
Definition: scheduler.h:283
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
void _Scheduler_default_Schedule(const Scheduler_Control *scheduler, Thread_Control *the_thread)
Does nothing.
Definition: schedulerdefaultschedule.c:15
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
Scheduler_Operations Operations
The scheduler operations.
Definition: scheduler.h:275
Scheduler control.
Definition: scheduler.h:266
Scheduler node for per-thread data.
Definition: schedulernode.h:65
const Scheduler_Control _Scheduler_Table[]
Registered schedulers.
Scheduler_Context * context
Reference to a statically allocated scheduler context.
Definition: scheduler.h:270
Constants and Structures Related with the Thread Control Block.
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
void _Scheduler_default_Node_destroy(const Scheduler_Control *scheduler, Scheduler_Node *node)
Does nothing.
Definition: schedulerdefaultnodedestroy.c:24
#define _Scheduler_Count
Count of registered schedulers.
Definition: scheduler.h:314