36 #ifndef _RTEMS_SCORE_SCHEDULERSTRONGAPA_H 37 #define _RTEMS_SCORE_SCHEDULERSTRONGAPA_H 39 #include <rtems/score/scheduler.h> 40 #include <rtems/score/schedulersmp.h> 41 #include <rtems/score/percpu.h> 47 #define STRONG_SCHEDULER_NODE_OF_CHAIN( node ) \ 48 RTEMS_CONTAINER_OF( node, Scheduler_strong_APA_Node, Ready_node ) 146 #define SCHEDULER_STRONG_APA_MAXIMUM_PRIORITY 255 151 #define SCHEDULER_STRONG_APA_ENTRY_POINTS \ 153 _Scheduler_strong_APA_Initialize, \ 154 _Scheduler_default_Schedule, \ 155 _Scheduler_strong_APA_Yield, \ 156 _Scheduler_strong_APA_Block, \ 157 _Scheduler_strong_APA_Unblock, \ 158 _Scheduler_strong_APA_Update_priority, \ 159 _Scheduler_default_Map_priority, \ 160 _Scheduler_default_Unmap_priority, \ 161 _Scheduler_strong_APA_Ask_for_help, \ 162 _Scheduler_strong_APA_Reconsider_help_request, \ 163 _Scheduler_strong_APA_Withdraw_node, \ 164 _Scheduler_default_Pin_or_unpin, \ 165 _Scheduler_default_Pin_or_unpin, \ 166 _Scheduler_strong_APA_Add_processor, \ 167 _Scheduler_strong_APA_Remove_processor, \ 168 _Scheduler_strong_APA_Node_initialize, \ 169 _Scheduler_default_Node_destroy, \ 170 _Scheduler_default_Release_job, \ 171 _Scheduler_default_Cancel_job, \ 172 _Scheduler_default_Tick, \ 173 _Scheduler_strong_APA_Start_idle, \ 174 _Scheduler_strong_APA_Set_affinity \ 193 const Scheduler_Control *scheduler,
194 Scheduler_Node *node,
195 Thread_Control *the_thread,
196 Priority_Control priority
207 const Scheduler_Control *scheduler,
208 Thread_Control *the_thread,
220 const Scheduler_Control *scheduler,
221 Thread_Control *the_thread,
233 const Scheduler_Control *scheduler,
234 Thread_Control *the_thread,
249 const Scheduler_Control *scheduler,
250 Thread_Control *the_thread,
262 const Scheduler_Control *scheduler,
263 Thread_Control *the_thread,
276 const Scheduler_Control *scheduler,
277 Thread_Control *the_thread,
278 Scheduler_Node *node,
279 Thread_Scheduler_state next_state
289 const Scheduler_Control *scheduler,
302 const Scheduler_Control *scheduler,
303 struct Per_CPU_Control *cpu
314 const Scheduler_Control *scheduler,
315 Thread_Control *the_thread,
327 const Scheduler_Control *scheduler,
328 Thread_Control *idle,
329 struct Per_CPU_Control *cpu
340 const Scheduler_Control *scheduler,
341 Thread_Control *thread,
342 Scheduler_Node *node_base,
343 const Processor_mask *affinity
Per_CPU_Control * cpu
CPU in a queue.
Scheduler_Node * preempting_node
The node that would preempt this CPU.
Chain_Control Ready
Chain of all the ready and scheduled nodes present in the Strong APA scheduler.
void _Scheduler_strong_APA_Add_processor(const Scheduler_Control *scheduler, Thread_Control *idle)
Adds the idle thread to a processor.
Chain_Node Ready_node
Chain node for Scheduler_strong_APA_Context::Ready.
CPU related variables and a CPU_Control to implement BFS.
bool _Scheduler_strong_APA_Ask_for_help(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Asks for help.
void _Scheduler_strong_APA_Node_initialize(const Scheduler_Control *scheduler, Scheduler_Node *node, Thread_Control *the_thread, Priority_Control priority)
Initializes the node with the given priority.
bool visited
Whether or not this cpu has been added to the queue (visited in BFS).
Scheduler_SMP_Node Base
SMP scheduler node.
Thread_Control * _Scheduler_strong_APA_Remove_processor(const Scheduler_Control *scheduler, struct Per_CPU_Control *cpu)
Removes an idle thread from the given cpu.
void _Scheduler_strong_APA_Withdraw_node(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node, Thread_Scheduler_state next_state)
Withdraws the node.
Per_CPU_Control * cpu_to_preempt
CPU that this node would preempt in the backtracking part of _Scheduler_strong_APA_Get_highest_ready ...
Scheduler_Node * executing
The node currently executing on this cpu.
void _Scheduler_strong_APA_Start_idle(const Scheduler_Control *scheduler, Thread_Control *idle, struct Per_CPU_Control *cpu)
Starts an idle thread.
Scheduler context and node definition for Strong APA scheduler.
void _Scheduler_strong_APA_Update_priority(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Updates the priority of the node.
Scheduler_SMP_Context Base
Processor_mask Affinity
The associated affinity set of this node.
Scheduler node specialization for Strong APA schedulers.
void _Scheduler_strong_APA_Block(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Blocks the thread.
void _Scheduler_strong_APA_Initialize(const Scheduler_Control *scheduler)
Initializes the scheduler.
bool _Scheduler_strong_APA_Set_affinity(const Scheduler_Control *scheduler, Thread_Control *thread, Scheduler_Node *node_base, const Processor_mask *affinity)
Sets the affinity .
void _Scheduler_strong_APA_Unblock(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Unblocks the thread.
void _Scheduler_strong_APA_Reconsider_help_request(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Reconsiders help request.
void _Scheduler_strong_APA_Yield(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Performs a yield operation.