RTEMS 6.1-rc4
Loading...
Searching...
No Matches
schedulerprioritysmp.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
13/*
14 * Copyright (C) 2013, 2018 embedded brains GmbH & Co. KG
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_SCHEDULERPRIORITYSMP_H
39#define _RTEMS_SCORE_SCHEDULERPRIORITYSMP_H
40
44
45#ifdef __cplusplus
46extern "C" {
47#endif /* __cplusplus */
48
71typedef struct {
73 Chain_Control *idle_ready_queue;
77
82typedef struct {
87
93
97#define SCHEDULER_PRIORITY_SMP_ENTRY_POINTS \
98 { \
99 _Scheduler_priority_SMP_Initialize, \
100 _Scheduler_default_Schedule, \
101 _Scheduler_priority_SMP_Yield, \
102 _Scheduler_priority_SMP_Block, \
103 _Scheduler_priority_SMP_Unblock, \
104 _Scheduler_priority_SMP_Update_priority, \
105 _Scheduler_default_Map_priority, \
106 _Scheduler_default_Unmap_priority, \
107 _Scheduler_priority_SMP_Ask_for_help, \
108 _Scheduler_priority_SMP_Reconsider_help_request, \
109 _Scheduler_priority_SMP_Withdraw_node, \
110 _Scheduler_priority_SMP_Make_sticky, \
111 _Scheduler_priority_SMP_Clean_sticky, \
112 _Scheduler_default_Pin_or_unpin_not_supported, \
113 _Scheduler_default_Pin_or_unpin_not_supported, \
114 _Scheduler_priority_SMP_Add_processor, \
115 _Scheduler_priority_SMP_Remove_processor, \
116 _Scheduler_priority_SMP_Node_initialize, \
117 _Scheduler_default_Node_destroy, \
118 _Scheduler_default_Release_job, \
119 _Scheduler_default_Cancel_job, \
120 _Scheduler_SMP_Start_idle \
121 SCHEDULER_DEFAULT_SET_AFFINITY_OPERATION \
122 }
123
132
142 const Scheduler_Control *scheduler,
143 Scheduler_Node *node,
144 Thread_Control *the_thread,
145 Priority_Control priority
146);
147
156 const Scheduler_Control *scheduler,
157 Thread_Control *thread,
158 Scheduler_Node *node
159);
160
169 const Scheduler_Control *scheduler,
170 Thread_Control *thread,
171 Scheduler_Node *node
172);
173
182 const Scheduler_Control *scheduler,
183 Thread_Control *the_thread,
184 Scheduler_Node *node
185);
186
198 const Scheduler_Control *scheduler,
199 Thread_Control *the_thread,
200 Scheduler_Node *node
201);
202
212 const Scheduler_Control *scheduler,
213 Thread_Control *the_thread,
214 Scheduler_Node *node
215);
216
227 const Scheduler_Control *scheduler,
228 Thread_Control *the_thread,
229 Scheduler_Node *node,
230 Thread_Scheduler_state next_state
231);
232
243 const Scheduler_Control *scheduler,
244 Thread_Control *the_thread,
245 Scheduler_Node *node
246);
247
258 const Scheduler_Control *scheduler,
259 Thread_Control *the_thread,
260 Scheduler_Node *node
261);
262
270 const Scheduler_Control *scheduler,
271 Thread_Control *idle
272);
273
283 const Scheduler_Control *scheduler,
284 struct Per_CPU_Control *cpu
285);
286
295 const Scheduler_Control *scheduler,
296 Thread_Control *thread,
297 Scheduler_Node *node
298);
299
302#ifdef __cplusplus
303}
304#endif /* __cplusplus */
305
306#endif /* _RTEMS_SCORE_SCHEDULERPRIORITYSMP_H */
#define RTEMS_ZERO_LENGTH_ARRAY
This constant represents the element count of a zero-length array.
Definition: basedefs.h:1032
uint64_t Priority_Control
The thread priority control.
Definition: priority.h:91
void _Scheduler_priority_SMP_Unblock(const Scheduler_Control *scheduler, Thread_Control *thread, Scheduler_Node *node)
Unblocks the thread.
Definition: schedulerprioritysmp.c:184
void _Scheduler_priority_SMP_Add_processor(const Scheduler_Control *scheduler, Thread_Control *idle)
Adds idle to scheduler.
Definition: schedulerprioritysmp.c:328
void _Scheduler_priority_SMP_Yield(const Scheduler_Control *scheduler, Thread_Control *thread, Scheduler_Node *node)
Performs the yield of a thread.
Definition: schedulerprioritysmp.c:362
void _Scheduler_priority_SMP_Withdraw_node(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node, Thread_Scheduler_state next_state)
Withdraws node operation.
Definition: schedulerprioritysmp.c:270
void _Scheduler_priority_SMP_Clean_sticky(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Cleans the sticky property from the node.
Definition: schedulerprioritysmp.c:308
void _Scheduler_priority_SMP_Update_priority(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Updates the priority of the node.
Definition: schedulerprioritysmp.c:222
void _Scheduler_priority_SMP_Initialize(const Scheduler_Control *scheduler)
Initializes the priority SMP scheduler.
Definition: schedulerprioritysmp.c:60
void _Scheduler_priority_SMP_Reconsider_help_request(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Reconsiders help operation.
Definition: schedulerprioritysmp.c:254
void _Scheduler_priority_SMP_Block(const Scheduler_Control *scheduler, Thread_Control *thread, Scheduler_Node *node)
Blocks the thread.
Definition: schedulerprioritysmp.c:119
void _Scheduler_priority_SMP_Node_initialize(const Scheduler_Control *scheduler, Scheduler_Node *node, Thread_Control *the_thread, Priority_Control priority)
Initializes the node with the given priority.
Definition: schedulerprioritysmp.c:74
Thread_Control * _Scheduler_priority_SMP_Remove_processor(const Scheduler_Control *scheduler, struct Per_CPU_Control *cpu)
Removes an idle thread from the given cpu.
Definition: schedulerprioritysmp.c:344
bool _Scheduler_priority_SMP_Ask_for_help(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Asks for help operation.
Definition: schedulerprioritysmp.c:243
void _Scheduler_priority_SMP_Make_sticky(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Makes the node sticky.
Definition: schedulerprioritysmp.c:293
This header file provides interfaces of the Deterministic Priority Scheduler which are used by the im...
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
Definition: prioritybitmap.h:60
Scheduler node for per-thread data.
Definition: schedulernode.h:94
Scheduler context specialization for SMP schedulers.
Definition: schedulersmp.h:61
Scheduler node specialization for SMP schedulers.
Definition: schedulersmp.h:106
Data for ready queue operations.
Definition: schedulerpriority.h:103
Scheduler context specialization for Deterministic Priority SMP schedulers.
Definition: schedulerprioritysmp.h:71
Scheduler node specialization for Deterministic Priority SMP schedulers.
Definition: schedulerprioritysmp.h:82
Scheduler_priority_Ready_queue Ready_queue
The associated ready queue of this node.
Definition: schedulerprioritysmp.h:91
Scheduler_SMP_Node Base
SMP scheduler node.
Definition: schedulerprioritysmp.h:86
Scheduler control.
Definition: scheduler.h:337
Definition: thread.h:837
This union represents a chain control block.
Definition: chain.h:96