RTEMS 6.1-rc2
Loading...
Searching...
No Matches
schedulerpriorityaffinitysmp.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
12/*
13 * COPYRIGHT (c) 2014.
14 * On-Line Applications Research Corporation (OAR).
15 *
16 * Redistribution and use in source and binary forms, with or without
17 * modification, are permitted provided that the following conditions
18 * are met:
19 * 1. Redistributions of source code must retain the above copyright
20 * notice, this list of conditions and the following disclaimer.
21 * 2. Redistributions in binary form must reproduce the above copyright
22 * notice, this list of conditions and the following disclaimer in the
23 * documentation and/or other materials provided with the distribution.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
29 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE.
36 */
37
38#ifndef _RTEMS_SCORE_SCHEDULERPRIORITYAFFINITYSMP_H
39#define _RTEMS_SCORE_SCHEDULERPRIORITYAFFINITYSMP_H
40
45
46#include <sys/cpuset.h>
47
48#ifdef __cplusplus
49extern "C" {
50#endif /* __cplusplus */
51
74#define SCHEDULER_PRIORITY_AFFINITY_SMP_ENTRY_POINTS \
75 { \
76 _Scheduler_priority_SMP_Initialize, \
77 _Scheduler_default_Schedule, \
78 _Scheduler_priority_affinity_SMP_Yield, \
79 _Scheduler_priority_affinity_SMP_Block, \
80 _Scheduler_priority_affinity_SMP_Unblock, \
81 _Scheduler_priority_affinity_SMP_Update_priority, \
82 _Scheduler_default_Map_priority, \
83 _Scheduler_default_Unmap_priority, \
84 _Scheduler_priority_affinity_SMP_Ask_for_help, \
85 _Scheduler_priority_affinity_SMP_Reconsider_help_request, \
86 _Scheduler_priority_affinity_SMP_Withdraw_node, \
87 _Scheduler_priority_affinity_SMP_Make_sticky, \
88 _Scheduler_priority_affinity_SMP_Clean_sticky, \
89 _Scheduler_default_Pin_or_unpin_not_supported, \
90 _Scheduler_default_Pin_or_unpin_not_supported, \
91 _Scheduler_priority_affinity_SMP_Add_processor, \
92 _Scheduler_priority_affinity_SMP_Remove_processor, \
93 _Scheduler_priority_affinity_SMP_Node_initialize, \
94 _Scheduler_default_Node_destroy, \
95 _Scheduler_default_Release_job, \
96 _Scheduler_default_Cancel_job, \
97 _Scheduler_SMP_Start_idle, \
98 _Scheduler_priority_affinity_SMP_Set_affinity \
99 }
100
113 const Scheduler_Control *scheduler,
114 Scheduler_Node *node,
115 Thread_Control *the_thread,
116 Priority_Control priority
117);
118
127 const Scheduler_Control *scheduler,
128 Thread_Control *thread,
129 Scheduler_Node *node
130);
131
132void _Scheduler_priority_affinity_SMP_Yield(
133 const Scheduler_Control *scheduler,
134 Thread_Control *thread,
135 Scheduler_Node *node
136);
137
146 const Scheduler_Control *scheduler,
147 Thread_Control *thread,
148 Scheduler_Node *node
149);
150
159 const Scheduler_Control *scheduler,
160 Thread_Control *the_thread,
161 Scheduler_Node *node
162);
163
175 const Scheduler_Control *scheduler,
176 Thread_Control *the_thread,
177 Scheduler_Node *node
178);
179
189 const Scheduler_Control *scheduler,
190 Thread_Control *the_thread,
191 Scheduler_Node *node
192);
193
204 const Scheduler_Control *scheduler,
205 Thread_Control *the_thread,
206 Scheduler_Node *node,
207 Thread_Scheduler_state next_state
208);
209
220 const Scheduler_Control *scheduler,
221 Thread_Control *the_thread,
222 Scheduler_Node *node
223);
224
235 const Scheduler_Control *scheduler,
236 Thread_Control *the_thread,
237 Scheduler_Node *node
238);
239
247 const Scheduler_Control *scheduler,
248 Thread_Control *idle
249);
250
260 const Scheduler_Control *scheduler,
261 struct Per_CPU_Control *cpu
262);
263
276 const Scheduler_Control *scheduler,
277 Thread_Control *thread,
278 Scheduler_Node *node,
279 const Processor_mask *affinity
280);
281
288typedef struct {
293
297 Processor_mask Affinity;
299
302#ifdef __cplusplus
303}
304#endif /* __cplusplus */
305
306#endif /* _RTEMS_SCORE_SCHEDULERPRIORITYAFFINITYSMP_H */
uint64_t Priority_Control
The thread priority control.
Definition: priority.h:91
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:604
Status_Control _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:641
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:95
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:530
void _Scheduler_priority_affinity_SMP_Add_processor(const Scheduler_Control *scheduler, Thread_Control *idle)
Adds idle to scheduler.
Definition: schedulerpriorityaffinitysmp.c:588
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:503
void _Scheduler_priority_affinity_SMP_Make_sticky(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Makes the node sticky.
Definition: schedulerpriorityaffinitysmp.c:553
void _Scheduler_priority_affinity_SMP_Block(const Scheduler_Control *scheduler, Thread_Control *thread, Scheduler_Node *node)
Blocks a thread.
Definition: schedulerpriorityaffinitysmp.c:197
void _Scheduler_priority_affinity_SMP_Reconsider_help_request(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Reconsiders help.
Definition: schedulerpriorityaffinitysmp.c:514
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:477
void _Scheduler_priority_affinity_SMP_Clean_sticky(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Cleans the sticky property from the node.
Definition: schedulerpriorityaffinitysmp.c:568
void _Scheduler_priority_affinity_SMP_Unblock(const Scheduler_Control *scheduler, Thread_Control *thread, Scheduler_Node *node)
Unblocks a thread.
Definition: schedulerpriorityaffinitysmp.c:381
Status_Control
Status codes.
Definition: status.h:111
This header file provides interfaces of the Deterministic Priority Scheduler which are used by the im...
This header file provides interfaces of the Deterministic Priority SMP Scheduler which are used by th...
This header file provides interfaces of the SMP Scheduler which are used by the implementation and th...
This header file provides interfaces of the Scheduler Handler which are used by the implementation an...
Per CPU Core Structure.
Definition: percpu.h:384
Scheduler node for per-thread data.
Definition: schedulernode.h:94
Scheduler node specialization for Deterministic Priority SMP schedulers.
Definition: schedulerprioritysmp.h:82
Scheduler node specialization for Deterministic Priority Affinity SMP schedulers.
Definition: schedulerpriorityaffinitysmp.h:288
Scheduler_priority_SMP_Node Base
SMP priority scheduler node.
Definition: schedulerpriorityaffinitysmp.h:292
Processor_mask Affinity
The thread processor affinity set.
Definition: schedulerpriorityaffinitysmp.h:297
Scheduler control.
Definition: scheduler.h:335
Definition: thread.h:812