RTEMS  5.0.0
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 
51 #define SCHEDULER_PRIORITY_AFFINITY_SMP_ENTRY_POINTS \
52  { \
53  _Scheduler_priority_SMP_Initialize, \
54  _Scheduler_default_Schedule, \
55  _Scheduler_priority_SMP_Yield, \
56  _Scheduler_priority_affinity_SMP_Block, \
57  _Scheduler_priority_affinity_SMP_Unblock, \
58  _Scheduler_priority_affinity_SMP_Update_priority, \
59  _Scheduler_default_Map_priority, \
60  _Scheduler_default_Unmap_priority, \
61  _Scheduler_priority_affinity_SMP_Ask_for_help, \
62  _Scheduler_priority_affinity_SMP_Reconsider_help_request, \
63  _Scheduler_priority_affinity_SMP_Withdraw_node, \
64  _Scheduler_default_Pin_or_unpin, \
65  _Scheduler_default_Pin_or_unpin, \
66  _Scheduler_priority_affinity_SMP_Add_processor, \
67  _Scheduler_priority_affinity_SMP_Remove_processor, \
68  _Scheduler_priority_affinity_SMP_Node_initialize, \
69  _Scheduler_default_Node_destroy, \
70  _Scheduler_default_Release_job, \
71  _Scheduler_default_Cancel_job, \
72  _Scheduler_default_Tick, \
73  _Scheduler_SMP_Start_idle, \
74  _Scheduler_priority_affinity_SMP_Set_affinity \
75  }
76 
89  const Scheduler_Control *scheduler,
90  Scheduler_Node *node,
91  Thread_Control *the_thread,
92  Priority_Control priority
93 );
94 
95 void _Scheduler_priority_affinity_SMP_Block(
96  const Scheduler_Control *scheduler,
97  Thread_Control *thread,
98  Scheduler_Node *node
99 );
100 
101 void _Scheduler_priority_affinity_SMP_Unblock(
102  const Scheduler_Control *scheduler,
103  Thread_Control *thread,
104  Scheduler_Node *node
105 );
106 
107 void _Scheduler_priority_affinity_SMP_Update_priority(
108  const Scheduler_Control *scheduler,
109  Thread_Control *the_thread,
110  Scheduler_Node *node
111 );
112 
113 bool _Scheduler_priority_affinity_SMP_Ask_for_help(
114  const Scheduler_Control *scheduler,
115  Thread_Control *the_thread,
116  Scheduler_Node *node
117 );
118 
119 void _Scheduler_priority_affinity_SMP_Reconsider_help_request(
120  const Scheduler_Control *scheduler,
121  Thread_Control *the_thread,
122  Scheduler_Node *node
123 );
124 
125 void _Scheduler_priority_affinity_SMP_Withdraw_node(
126  const Scheduler_Control *scheduler,
127  Thread_Control *the_thread,
128  Scheduler_Node *node,
129  Thread_Scheduler_state next_state
130 );
131 
132 void _Scheduler_priority_affinity_SMP_Add_processor(
133  const Scheduler_Control *scheduler,
134  Thread_Control *idle
135 );
136 
137 Thread_Control *_Scheduler_priority_affinity_SMP_Remove_processor(
138  const Scheduler_Control *scheduler,
139  struct Per_CPU_Control *cpu
140 );
141 
153  const Scheduler_Control *scheduler,
154  Thread_Control *thread,
155  Scheduler_Node *node,
156  const Processor_mask *affinity
157 );
158 
165 typedef struct {
170 
174  Processor_mask Affinity;
176 
179 #ifdef __cplusplus
180 }
181 #endif /* __cplusplus */
182 
183 #endif /* _RTEMS_SCORE_SCHEDULERPRIORITYAFFINITYSMP_H */
bool _Scheduler_priority_affinity_SMP_Set_affinity(const Scheduler_Control *scheduler, Thread_Control *thread, Scheduler_Node *node, const Processor_mask *affinity)
Set affinity for the priority affinity SMP scheduler.
Definition: schedulerpriorityaffinitysmp.c:534
SMP Scheduler API.
Thread Manipulation with the Priority-Based Scheduler.
Scheduler_priority_SMP_Node Base
SMP priority scheduler node.
Definition: schedulerpriorityaffinitysmp.h:169
Deterministic Priority SMP Scheduler API.
uint64_t Priority_Control
The thread priority control.
Definition: priority.h:66
Definition: thread.h:728
Per CPU Core Structure.
Definition: percpu.h:290
Processor_mask Affinity
The thread processor affinity set.
Definition: schedulerpriorityaffinitysmp.h:174
Scheduler control.
Definition: scheduler.h:266
Scheduler node for per-thread data.
Definition: schedulernode.h:65
Scheduler node specialization for Deterministic Priority SMP schedulers.
Definition: schedulerprioritysmp.h:64
Constants and Structures Associated with the Scheduler.
Scheduler node specialization for Deterministic Priority Affinity SMP schedulers. ...
Definition: schedulerpriorityaffinitysmp.h:165
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