RTEMS: cpukit/include/rtems/score/schedulerstrongapa.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
schedulerstrongapa.h
Go to the documentation of this file.
1
9/*
10 * Copyright (c) 2013, 2018 embedded brains GmbH. All rights reserved.
11 *
12 * embedded brains GmbH
13 * Dornierstr. 4
14 * 82178 Puchheim
15 * Germany
16 * <rtems@embedded-brains.de>
17 *
18 * The license and distribution terms for this file may be
19 * found in the file LICENSE in this distribution or at
20 * http://www.rtems.org/license/LICENSE.
21 */
22
23#ifndef _RTEMS_SCORE_SCHEDULERSTRONGAPA_H
24#define _RTEMS_SCORE_SCHEDULERSTRONGAPA_H
25
26#include <rtems/score/scheduler.h>
27#include <rtems/score/schedulerpriority.h>
28#include <rtems/score/schedulersmp.h>
29
30#ifdef __cplusplus
31extern "C" {
32#endif /* __cplusplus */
33
56 typedef struct {
57 Scheduler_SMP_Context Base;
58 Priority_bit_map_Control Bit_map;
59 Chain_Control Ready[ RTEMS_ZERO_LENGTH_ARRAY ];
60} Scheduler_strong_APA_Context;
61
66 typedef struct {
70 Scheduler_SMP_Node Base;
71
75 Scheduler_priority_Ready_queue Ready_queue;
76} Scheduler_strong_APA_Node;
77
81#define SCHEDULER_STRONG_APA_ENTRY_POINTS \
82 { \
83 _Scheduler_strong_APA_Initialize, \
84 _Scheduler_default_Schedule, \
85 _Scheduler_strong_APA_Yield, \
86 _Scheduler_strong_APA_Block, \
87 _Scheduler_strong_APA_Unblock, \
88 _Scheduler_strong_APA_Update_priority, \
89 _Scheduler_default_Map_priority, \
90 _Scheduler_default_Unmap_priority, \
91 _Scheduler_strong_APA_Ask_for_help, \
92 _Scheduler_strong_APA_Reconsider_help_request, \
93 _Scheduler_strong_APA_Withdraw_node, \
94 _Scheduler_default_Pin_or_unpin, \
95 _Scheduler_default_Pin_or_unpin, \
96 _Scheduler_strong_APA_Add_processor, \
97 _Scheduler_strong_APA_Remove_processor, \
98 _Scheduler_strong_APA_Node_initialize, \
99 _Scheduler_default_Node_destroy, \
100 _Scheduler_default_Release_job, \
101 _Scheduler_default_Cancel_job, \
102 _Scheduler_default_Tick, \
103 _Scheduler_SMP_Start_idle \
104 SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY \
105 }
106
112void _Scheduler_strong_APA_Initialize( const Scheduler_Control *scheduler );
113
122void _Scheduler_strong_APA_Node_initialize(
123 const Scheduler_Control *scheduler,
124 Scheduler_Node *node,
125 Thread_Control *the_thread,
126 Priority_Control priority
127);
128
136void _Scheduler_strong_APA_Block(
137 const Scheduler_Control *scheduler,
138 Thread_Control *the_thread,
139 Scheduler_Node *node
140);
141
149void _Scheduler_strong_APA_Unblock(
150 const Scheduler_Control *scheduler,
151 Thread_Control *the_thread,
152 Scheduler_Node *node
153);
154
162void _Scheduler_strong_APA_Update_priority(
163 const Scheduler_Control *scheduler,
164 Thread_Control *the_thread,
165 Scheduler_Node *node
166);
167
178bool _Scheduler_strong_APA_Ask_for_help(
179 const Scheduler_Control *scheduler,
180 Thread_Control *the_thread,
181 Scheduler_Node *node
182);
183
191void _Scheduler_strong_APA_Reconsider_help_request(
192 const Scheduler_Control *scheduler,
193 Thread_Control *the_thread,
194 Scheduler_Node *node
195);
196
205void _Scheduler_strong_APA_Withdraw_node(
206 const Scheduler_Control *scheduler,
207 Thread_Control *the_thread,
208 Scheduler_Node *node,
209 Thread_Scheduler_state next_state
210);
211
218void _Scheduler_strong_APA_Add_processor(
219 const Scheduler_Control *scheduler,
220 Thread_Control *idle
221);
222
231 Thread_Control *_Scheduler_strong_APA_Remove_processor(
232 const Scheduler_Control *scheduler,
233 struct Per_CPU_Control *cpu
234);
235
243void _Scheduler_strong_APA_Yield(
244 const Scheduler_Control *scheduler,
245 Thread_Control *the_thread,
246 Scheduler_Node *node
247);
248
251#ifdef __cplusplus
252}
253#endif /* __cplusplus */
254
255#endif /* _RTEMS_SCORE_SCHEDULERSTRONGAPA_H */
Priority_Control
uint64_t Priority_Control
The thread priority control.
Definition: priority.h:70
_Scheduler_strong_APA_Yield
void _Scheduler_strong_APA_Yield(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Performs a yield operation.
Definition: schedulerstrongapa.c:419
_Scheduler_strong_APA_Remove_processor
Thread_Control * _Scheduler_strong_APA_Remove_processor(const Scheduler_Control *scheduler, struct Per_CPU_Control *cpu)
Removes an idle thread from the given cpu.
Definition: schedulerstrongapa.c:404
_Scheduler_strong_APA_Block
void _Scheduler_strong_APA_Block(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Blocks the thread.
Definition: schedulerstrongapa.c:225
_Scheduler_strong_APA_Node_initialize
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.
Definition: schedulerstrongapa.c:172
_Scheduler_strong_APA_Update_priority
void _Scheduler_strong_APA_Update_priority(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Updates the priority of the node.
Definition: schedulerstrongapa.c:320
_Scheduler_strong_APA_Add_processor
void _Scheduler_strong_APA_Add_processor(const Scheduler_Control *scheduler, Thread_Control *idle)
Adds the idle thread to a processor.
Definition: schedulerstrongapa.c:388
_Scheduler_strong_APA_Unblock
void _Scheduler_strong_APA_Unblock(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Unblocks the thread.
Definition: schedulerstrongapa.c:284
_Scheduler_strong_APA_Reconsider_help_request
void _Scheduler_strong_APA_Reconsider_help_request(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Reconsiders help request.
Definition: schedulerstrongapa.c:351
_Scheduler_strong_APA_Ask_for_help
bool _Scheduler_strong_APA_Ask_for_help(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Asks for help.
Definition: schedulerstrongapa.c:340
_Scheduler_strong_APA_Withdraw_node
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.
Definition: schedulerstrongapa.c:367
_Scheduler_strong_APA_Initialize
void _Scheduler_strong_APA_Initialize(const Scheduler_Control *scheduler)
Initializes the scheduler.
Definition: schedulerstrongapa.c:159
schedulerpriority.h
Thread Manipulation with the Priority-Based Scheduler.
schedulersmp.h
SMP Scheduler API.
scheduler.h
Constants and Structures Associated with the Scheduler.
Per_CPU_Control
Per CPU Core Structure.
Definition: percpu.h:347
Priority_bit_map_Control
Definition: prioritybitmap.h:42
Scheduler_Node
Scheduler node for per-thread data.
Definition: schedulernode.h:79
Scheduler_SMP_Context
Scheduler context specialization for SMP schedulers.
Definition: schedulersmp.h:46
Scheduler_SMP_Node
Scheduler node specialization for SMP schedulers.
Definition: schedulersmp.h:100
Scheduler_priority_Ready_queue
Data for ready queue operations.
Definition: schedulerpriority.h:85
Scheduler_strong_APA_Context
Scheduler context specialization for Strong APA schedulers.
Definition: schedulerstrongapa.h:56
Scheduler_strong_APA_Node
Scheduler node specialization for Strong APA schedulers.
Definition: schedulerstrongapa.h:66
Scheduler_strong_APA_Node::Ready_queue
Scheduler_priority_Ready_queue Ready_queue
The associated ready queue of this node.
Definition: schedulerstrongapa.h:75
Scheduler_strong_APA_Node::Base
Scheduler_SMP_Node Base
SMP scheduler node.
Definition: schedulerstrongapa.h:70
_Scheduler_Control
Scheduler control.
Definition: scheduler.h:269
_Thread_Control
Definition: thread.h:732
Chain_Control
Definition: chain.h:86