RTEMS  5.1
schedulerpriorityaffinitysmp.h
Go to the documentation of this file.
1 
9 /*
10  * COPYRIGHT (c) 2014.
11  * On-Line Applications Research Corporation (OAR).
12  *
13  * The license and distribution terms for this file may be
14  * found in the file LICENSE in this distribution or at
15  * http://www.rtems.org/license/LICENSE.
16  */
17 
18 #ifndef _RTEMS_SCORE_SCHEDULERPRIORITYAFFINITYSMP_H
19 #define _RTEMS_SCORE_SCHEDULERPRIORITYAFFINITYSMP_H
20 
21 #include <rtems/score/scheduler.h>
25 
26 #include <sys/cpuset.h>
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31 
53 #define SCHEDULER_PRIORITY_AFFINITY_SMP_ENTRY_POINTS \
54  { \
55  _Scheduler_priority_SMP_Initialize, \
56  _Scheduler_default_Schedule, \
57  _Scheduler_priority_SMP_Yield, \
58  _Scheduler_priority_affinity_SMP_Block, \
59  _Scheduler_priority_affinity_SMP_Unblock, \
60  _Scheduler_priority_affinity_SMP_Update_priority, \
61  _Scheduler_default_Map_priority, \
62  _Scheduler_default_Unmap_priority, \
63  _Scheduler_priority_affinity_SMP_Ask_for_help, \
64  _Scheduler_priority_affinity_SMP_Reconsider_help_request, \
65  _Scheduler_priority_affinity_SMP_Withdraw_node, \
66  _Scheduler_default_Pin_or_unpin, \
67  _Scheduler_default_Pin_or_unpin, \
68  _Scheduler_priority_affinity_SMP_Add_processor, \
69  _Scheduler_priority_affinity_SMP_Remove_processor, \
70  _Scheduler_priority_affinity_SMP_Node_initialize, \
71  _Scheduler_default_Node_destroy, \
72  _Scheduler_default_Release_job, \
73  _Scheduler_default_Cancel_job, \
74  _Scheduler_default_Tick, \
75  _Scheduler_SMP_Start_idle, \
76  _Scheduler_priority_affinity_SMP_Set_affinity \
77  }
78 
91  const Scheduler_Control *scheduler,
92  Scheduler_Node *node,
93  Thread_Control *the_thread,
94  Priority_Control priority
95 );
96 
105  const Scheduler_Control *scheduler,
106  Thread_Control *thread,
107  Scheduler_Node *node
108 );
109 
118  const Scheduler_Control *scheduler,
119  Thread_Control *thread,
120  Scheduler_Node *node
121 );
122 
131  const Scheduler_Control *scheduler,
132  Thread_Control *the_thread,
133  Scheduler_Node *node
134 );
135 
147  const Scheduler_Control *scheduler,
148  Thread_Control *the_thread,
149  Scheduler_Node *node
150 );
151 
161  const Scheduler_Control *scheduler,
162  Thread_Control *the_thread,
163  Scheduler_Node *node
164 );
165 
176  const Scheduler_Control *scheduler,
177  Thread_Control *the_thread,
178  Scheduler_Node *node,
179  Thread_Scheduler_state next_state
180 );
181 
189  const Scheduler_Control *scheduler,
190  Thread_Control *idle
191 );
192 
202  const Scheduler_Control *scheduler,
203  struct Per_CPU_Control *cpu
204 );
205 
218  const Scheduler_Control *scheduler,
219  Thread_Control *thread,
220  Scheduler_Node *node,
221  const Processor_mask *affinity
222 );
223 
230 typedef struct {
235 
239  Processor_mask Affinity;
241 
244 #ifdef __cplusplus
245 }
246 #endif /* __cplusplus */
247 
248 #endif /* _RTEMS_SCORE_SCHEDULERPRIORITYAFFINITYSMP_H */
void _Scheduler_priority_affinity_SMP_Unblock(const Scheduler_Control *scheduler, Thread_Control *thread, Scheduler_Node *node)
Unblocks a thread.
Definition: schedulerpriorityaffinitysmp.c:341
SMP Scheduler API.
uint64_t Priority_Control
The thread priority control.
Definition: priority.h:70
Thread_Control * _Scheduler_priority_affinity_SMP_Remove_processor(const Scheduler_Control *scheduler, struct Per_CPU_Control *cpu)
Removes an idle thread from the given cpu.
Definition: schedulerpriorityaffinitysmp.c:519
void _Scheduler_priority_affinity_SMP_Block(const Scheduler_Control *scheduler, Thread_Control *thread, Scheduler_Node *node)
Blocks a thread.
Definition: schedulerpriorityaffinitysmp.c:165
Thread Manipulation with the Priority-Based Scheduler.
void _Scheduler_priority_affinity_SMP_Withdraw_node(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node, Thread_Scheduler_state next_state)
Withdraws node.
Definition: schedulerpriorityaffinitysmp.c:482
Scheduler_priority_SMP_Node Base
SMP priority scheduler node.
Definition: schedulerpriorityaffinitysmp.h:234
Deterministic Priority SMP Scheduler API.
bool _Scheduler_priority_affinity_SMP_Ask_for_help(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Asks for help.
Definition: schedulerpriorityaffinitysmp.c:455
Definition: thread.h:732
Per CPU Core Structure.
Definition: percpu.h:347
void _Scheduler_priority_affinity_SMP_Node_initialize(const Scheduler_Control *scheduler, Scheduler_Node *node, Thread_Control *the_thread, Priority_Control priority)
Initializes per thread scheduler information.
Definition: schedulerpriorityaffinitysmp.c:63
void _Scheduler_priority_affinity_SMP_Reconsider_help_request(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Reconsiders help.
Definition: schedulerpriorityaffinitysmp.c:466
Processor_mask Affinity
The thread processor affinity set.
Definition: schedulerpriorityaffinitysmp.h:239
Scheduler control.
Definition: scheduler.h:269
Scheduler node for per-thread data.
Definition: schedulernode.h:79
void _Scheduler_priority_affinity_SMP_Update_priority(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Updates the priority of the node.
Definition: schedulerpriorityaffinitysmp.c:430
Scheduler node specialization for Deterministic Priority SMP schedulers.
Definition: schedulerprioritysmp.h:66
bool _Scheduler_priority_affinity_SMP_Set_affinity(const Scheduler_Control *scheduler, Thread_Control *thread, Scheduler_Node *node, const Processor_mask *affinity)
Sets affinity for the priority affinity SMP scheduler.
Definition: schedulerpriorityaffinitysmp.c:534
Constants and Structures Associated with the Scheduler.
void _Scheduler_priority_affinity_SMP_Add_processor(const Scheduler_Control *scheduler, Thread_Control *idle)
Adds idle to scheduler.
Definition: schedulerpriorityaffinitysmp.c:503
Scheduler node specialization for Deterministic Priority Affinity SMP schedulers.
Definition: schedulerpriorityaffinitysmp.h:230