RTEMS  5.1
schedulerprioritysmp.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_SCHEDULERPRIORITYSMP_H
24 #define _RTEMS_SCORE_SCHEDULERPRIORITYSMP_H
25 
26 #include <rtems/score/scheduler.h>
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif /* __cplusplus */
33 
56 typedef struct {
59  Chain_Control Ready[ RTEMS_ZERO_LENGTH_ARRAY ];
61 
66 typedef struct {
71 
77 
81 #define SCHEDULER_PRIORITY_SMP_ENTRY_POINTS \
82  { \
83  _Scheduler_priority_SMP_Initialize, \
84  _Scheduler_default_Schedule, \
85  _Scheduler_priority_SMP_Yield, \
86  _Scheduler_priority_SMP_Block, \
87  _Scheduler_priority_SMP_Unblock, \
88  _Scheduler_priority_SMP_Update_priority, \
89  _Scheduler_default_Map_priority, \
90  _Scheduler_default_Unmap_priority, \
91  _Scheduler_priority_SMP_Ask_for_help, \
92  _Scheduler_priority_SMP_Reconsider_help_request, \
93  _Scheduler_priority_SMP_Withdraw_node, \
94  _Scheduler_default_Pin_or_unpin, \
95  _Scheduler_default_Pin_or_unpin, \
96  _Scheduler_priority_SMP_Add_processor, \
97  _Scheduler_priority_SMP_Remove_processor, \
98  _Scheduler_priority_SMP_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 
115 
125  const Scheduler_Control *scheduler,
126  Scheduler_Node *node,
127  Thread_Control *the_thread,
128  Priority_Control priority
129 );
130 
139  const Scheduler_Control *scheduler,
140  Thread_Control *thread,
141  Scheduler_Node *node
142 );
143 
152  const Scheduler_Control *scheduler,
153  Thread_Control *thread,
154  Scheduler_Node *node
155 );
156 
165  const Scheduler_Control *scheduler,
166  Thread_Control *the_thread,
167  Scheduler_Node *node
168 );
169 
181  const Scheduler_Control *scheduler,
182  Thread_Control *the_thread,
183  Scheduler_Node *node
184 );
185 
195  const Scheduler_Control *scheduler,
196  Thread_Control *the_thread,
197  Scheduler_Node *node
198 );
199 
210  const Scheduler_Control *scheduler,
211  Thread_Control *the_thread,
212  Scheduler_Node *node,
213  Thread_Scheduler_state next_state
214 );
215 
223  const Scheduler_Control *scheduler,
224  Thread_Control *idle
225 );
226 
236  const Scheduler_Control *scheduler,
237  struct Per_CPU_Control *cpu
238 );
239 
248  const Scheduler_Control *scheduler,
249  Thread_Control *thread,
250  Scheduler_Node *node
251 );
252 
255 #ifdef __cplusplus
256 }
257 #endif /* __cplusplus */
258 
259 #endif /* _RTEMS_SCORE_SCHEDULERPRIORITYSMP_H */
Scheduler context specialization for SMP schedulers.
Definition: schedulersmp.h:46
SMP Scheduler API.
uint64_t Priority_Control
The thread priority control.
Definition: priority.h:70
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:208
Definition: prioritybitmap.h:42
void _Scheduler_priority_SMP_Unblock(const Scheduler_Control *scheduler, Thread_Control *thread, Scheduler_Node *node)
Unblocks the thread.
Definition: schedulerprioritysmp.c:152
Definition: chain.h:86
Thread Manipulation with the Priority-Based Scheduler.
Scheduler_SMP_Node Base
SMP scheduler node.
Definition: schedulerprioritysmp.h:70
void _Scheduler_priority_SMP_Block(const Scheduler_Control *scheduler, Thread_Control *thread, Scheduler_Node *node)
Blocks the thread.
Definition: schedulerprioritysmp.c:93
void _Scheduler_priority_SMP_Initialize(const Scheduler_Control *scheduler)
Initializes the priority SMP scheduler.
Definition: schedulerprioritysmp.c:35
Scheduler context specialization for Deterministic Priority SMP schedulers.
Definition: schedulerprioritysmp.h:56
Definition: thread.h:732
void _Scheduler_priority_SMP_Yield(const Scheduler_Control *scheduler, Thread_Control *thread, Scheduler_Node *node)
Performs the yield of a thread.
Definition: schedulerprioritysmp.c:287
Scheduler_priority_Ready_queue Ready_queue
The associated ready queue of this node.
Definition: schedulerprioritysmp.h:75
Per CPU Core Structure.
Definition: percpu.h:347
Data for ready queue operations.
Definition: schedulerpriority.h:85
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:235
Scheduler node specialization for SMP schedulers.
Definition: schedulersmp.h:100
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:188
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:272
void _Scheduler_priority_SMP_Add_processor(const Scheduler_Control *scheduler, Thread_Control *idle)
Adds idle to scheduler.
Definition: schedulerprioritysmp.c:256
Scheduler control.
Definition: scheduler.h:269
Scheduler node for per-thread data.
Definition: schedulernode.h:79
Scheduler node specialization for Deterministic Priority SMP schedulers.
Definition: schedulerprioritysmp.h:66
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:48
void _Scheduler_priority_SMP_Reconsider_help_request(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Reconsiders help operation.
Definition: schedulerprioritysmp.c:219
Constants and Structures Associated with the Scheduler.