39#ifndef _RTEMS_SCORE_SCHEDULER_H
40#define _RTEMS_SCORE_SCHEDULER_H
67 void ( *
schedule )(
const Scheduler_Control *, Thread_Control *);
71 const Scheduler_Control *,
78 const Scheduler_Control *,
85 const Scheduler_Control *,
92 const Scheduler_Control *,
99 const Scheduler_Control *,
105 const Scheduler_Control *,
109#if defined(RTEMS_SMP)
120 bool ( *ask_for_help )(
121 const Scheduler_Control *scheduler,
122 Thread_Control *the_thread,
134 void ( *reconsider_help_request )(
135 const Scheduler_Control *scheduler,
136 Thread_Control *the_thread,
149 void ( *withdraw_node )(
150 const Scheduler_Control *scheduler,
151 Thread_Control *the_thread,
153 Thread_Scheduler_state next_state
181 void ( *make_sticky )(
182 const Scheduler_Control *scheduler,
183 Thread_Control *the_thread,
205 void ( *clean_sticky )(
206 const Scheduler_Control *scheduler,
207 Thread_Control *the_thread,
220 const Scheduler_Control *scheduler,
221 Thread_Control *the_thread,
235 const Scheduler_Control *scheduler,
236 Thread_Control *the_thread,
247 void ( *add_processor )(
248 const Scheduler_Control *scheduler,
260 Thread_Control *( *remove_processor )(
261 const Scheduler_Control *scheduler,
268 const Scheduler_Control *,
279 const Scheduler_Control *,
288 const Scheduler_Control *,
296 const Scheduler_Control *,
301#if defined(RTEMS_SMP)
304 const Scheduler_Control *,
307 const Processor_mask *
319#if defined(RTEMS_SMP)
323 ISR_lock_Control Lock;
328 Processor_mask Processors;
361#if defined(RTEMS_SMP)
366 bool is_non_preempt_mode_supported;
392#if defined(RTEMS_SMP)
395 #define _Scheduler_Count ( (size_t) 1 )
398#if defined(RTEMS_SMP)
402 #define SCHEDULER_ASSIGN_DEFAULT UINT32_C(0x0)
407 #define SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL SCHEDULER_ASSIGN_DEFAULT
412 #define SCHEDULER_ASSIGN_PROCESSOR_MANDATORY UINT32_C(0x1)
421 const Scheduler_Control *scheduler;
433 } Scheduler_Assignment;
444 extern const Scheduler_Assignment _Scheduler_Initial_assignments[];
457 const Scheduler_Control *scheduler,
471 const Scheduler_Control *scheduler,
475#if defined(RTEMS_SMP)
488 void _Scheduler_default_Sticky_do_nothing(
489 const Scheduler_Control *scheduler,
490 Thread_Control *the_thread,
505 void _Scheduler_default_Pin_or_unpin_do_nothing(
506 const Scheduler_Control *scheduler,
507 Thread_Control *the_thread,
524 void _Scheduler_default_Pin_or_unpin_not_supported(
525 const Scheduler_Control *scheduler,
526 Thread_Control *the_thread,
551#if defined(RTEMS_SMP)
552 #define SCHEDULER_DEFAULT_SMP_OPERATIONS \
556 _Scheduler_default_Sticky_do_nothing, \
557 _Scheduler_default_Sticky_do_nothing, \
558 _Scheduler_default_Pin_or_unpin_do_nothing, \
559 _Scheduler_default_Pin_or_unpin_do_nothing, \
563 #define SCHEDULER_DEFAULT_SMP_OPERATIONS
573 const Scheduler_Control *scheduler,
574 Thread_Control *the_thread
586 const Scheduler_Control *scheduler,
588 Thread_Control *the_thread,
599 const Scheduler_Control *scheduler,
615 const Scheduler_Control *scheduler,
616 Thread_Control *the_thread,
633 const Scheduler_Control *scheduler,
634 Thread_Control *the_thread,
647 const Scheduler_Control *scheduler,
648 Thread_Control *the_thread,
652#if defined(RTEMS_SMP)
670 const Scheduler_Control *scheduler,
671 Thread_Control *thread,
673 const Processor_mask *affinity
687#if defined(RTEMS_SMP)
688 #define SCHEDULER_DEFAULT_SET_AFFINITY_OPERATION \
689 , _Scheduler_default_Set_affinity
691 #define SCHEDULER_DEFAULT_SET_AFFINITY_OPERATION
698#define PRIORITY_MAXIMUM ( _Scheduler_Table[ 0 ].maximum_priority )
uint64_t Priority_Control
The thread priority control.
Definition priority.h:91
#define _Scheduler_Count
This constant contains the count of configured schedulers.
Definition scheduler.h:395
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:44
void _Scheduler_default_Node_destroy(const Scheduler_Control *scheduler, Scheduler_Node *node)
Does nothing.
Definition schedulerdefaultnodedestroy.c:45
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.
Definition schedulerdefaultnodeinit.c:44
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:43
void _Scheduler_default_Schedule(const Scheduler_Control *scheduler, Thread_Control *the_thread)
Does nothing.
Definition schedulerdefaultschedule.c:43
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:51
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:59
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:43
Status_Control
Status codes.
Definition status.h:111
This header file provides the interfaces of the Operation Status Support.
This header file provides interfaces of the Thread Handler which are used by the implementation and t...
Per CPU Core Structure.
Definition percpu.h:384
The priority node to build up a priority aggregation.
Definition priority.h:112
Scheduler context.
Definition scheduler.h:318
Scheduler node for per-thread data.
Definition schedulernode.h:94
The scheduler operations.
Definition scheduler.h:62
void(*) yield(const Scheduler_Control *, Thread_Control *, Scheduler_Node *)
Definition scheduler.h:70
void(*) schedule(const Scheduler_Control *, Thread_Control *)
Definition scheduler.h:67
void(*) start_idle(const Scheduler_Control *, Thread_Control *, struct Per_CPU_Control *)
Definition scheduler.h:295
void(*) node_destroy(const Scheduler_Control *, Scheduler_Node *)
Definition scheduler.h:275
Priority_Control(*) map_priority(const Scheduler_Control *, Priority_Control)
Definition scheduler.h:98
void(*) release_job(const Scheduler_Control *, Thread_Control *, Priority_Node *, uint64_t, Thread_queue_Context *)
Definition scheduler.h:278
void(*) initialize(const Scheduler_Control *)
Definition scheduler.h:64
void(*) update_priority(const Scheduler_Control *, Thread_Control *, Scheduler_Node *)
Definition scheduler.h:91
Priority_Control(*) unmap_priority(const Scheduler_Control *, Priority_Control)
Definition scheduler.h:104
void(*) block(const Scheduler_Control *, Thread_Control *, Scheduler_Node *)
Definition scheduler.h:77
void(*) unblock(const Scheduler_Control *, Thread_Control *, Scheduler_Node *)
Definition scheduler.h:84
void(*) node_initialize(const Scheduler_Control *, Scheduler_Node *, Thread_Control *, Priority_Control)
Definition scheduler.h:267
void(*) cancel_job(const Scheduler_Control *, Thread_Control *, Priority_Node *, Thread_queue_Context *)
Definition scheduler.h:287
Thread queue context for the thread queue methods.
Definition threadq.h:216
Scheduler control.
Definition scheduler.h:337
Scheduler_Context * context
Reference to a statically allocated scheduler context.
Definition scheduler.h:341
uint32_t name
The scheduler name.
Definition scheduler.h:359
Scheduler_Operations Operations
The scheduler operations.
Definition scheduler.h:346
Priority_Control maximum_priority
The maximum priority value of this scheduler.
Definition scheduler.h:354