RTEMS  5.1
schedulersimplesmp.h
Go to the documentation of this file.
1 
9 /*
10  * Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
11  *
12  * Copyright (c) 2013, 2018 embedded brains GmbH.
13  *
14  * The license and distribution terms for this file may be
15  * found in the file LICENSE in this distribution or at
16  * http://www.rtems.org/license/LICENSE.
17  */
18 
19 #ifndef _RTEMS_SCORE_SCHEDULERSIMPLE_SMP_H
20 #define _RTEMS_SCORE_SCHEDULERSIMPLE_SMP_H
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 #include <rtems/score/scheduler.h>
29 
54 typedef struct {
56  Chain_Control Ready;
58 
59 #define SCHEDULER_SIMPLE_SMP_MAXIMUM_PRIORITY 255
60 
64 #define SCHEDULER_SIMPLE_SMP_ENTRY_POINTS \
65  { \
66  _Scheduler_simple_SMP_Initialize, \
67  _Scheduler_default_Schedule, \
68  _Scheduler_simple_SMP_Yield, \
69  _Scheduler_simple_SMP_Block, \
70  _Scheduler_simple_SMP_Unblock, \
71  _Scheduler_simple_SMP_Update_priority, \
72  _Scheduler_default_Map_priority, \
73  _Scheduler_default_Unmap_priority, \
74  _Scheduler_simple_SMP_Ask_for_help, \
75  _Scheduler_simple_SMP_Reconsider_help_request, \
76  _Scheduler_simple_SMP_Withdraw_node, \
77  _Scheduler_default_Pin_or_unpin, \
78  _Scheduler_default_Pin_or_unpin, \
79  _Scheduler_simple_SMP_Add_processor, \
80  _Scheduler_simple_SMP_Remove_processor, \
81  _Scheduler_simple_SMP_Node_initialize, \
82  _Scheduler_default_Node_destroy, \
83  _Scheduler_default_Release_job, \
84  _Scheduler_default_Cancel_job, \
85  _Scheduler_default_Tick, \
86  _Scheduler_SMP_Start_idle \
87  SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY \
88  }
89 
96 
106  const Scheduler_Control *scheduler,
107  Scheduler_Node *node,
108  Thread_Control *the_thread,
109  Priority_Control priority
110 );
111 
120  const Scheduler_Control *scheduler,
121  Thread_Control *thread,
122  Scheduler_Node *node
123 );
124 
133  const Scheduler_Control *scheduler,
134  Thread_Control *thread,
135  Scheduler_Node *node
136 );
137 
146  const Scheduler_Control *scheduler,
147  Thread_Control *the_thread,
148  Scheduler_Node *node
149 );
150 
162  const Scheduler_Control *scheduler,
163  Thread_Control *the_thread,
164  Scheduler_Node *node
165 );
166 
176  const Scheduler_Control *scheduler,
177  Thread_Control *the_thread,
178  Scheduler_Node *node
179 );
180 
191  const Scheduler_Control *scheduler,
192  Thread_Control *the_thread,
193  Scheduler_Node *node,
194  Thread_Scheduler_state next_state
195 );
196 
204  const Scheduler_Control *scheduler,
205  Thread_Control *idle
206 );
207 
217  const Scheduler_Control *scheduler,
218  struct Per_CPU_Control *cpu
219 );
220 
229  const Scheduler_Control *scheduler,
230  Thread_Control *thread,
231  Scheduler_Node *node
232 );
233 
236 #ifdef __cplusplus
237 }
238 #endif
239 
240 #endif
241 /* end of include file */
void _Scheduler_simple_SMP_Update_priority(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Updates the priority of the node.
Definition: schedulersimplesmp.c:260
void _Scheduler_simple_SMP_Withdraw_node(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node, Thread_Scheduler_state next_state)
Withdraws node.
Definition: schedulersimplesmp.c:307
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
void _Scheduler_simple_SMP_Initialize(const Scheduler_Control *scheduler)
Initializes the scheduler's context.
Definition: schedulersimplesmp.c:36
Definition: chain.h:86
void _Scheduler_simple_SMP_Unblock(const Scheduler_Control *scheduler, Thread_Control *thread, Scheduler_Node *node)
Unblocks a thread.
Definition: schedulersimplesmp.c:224
Thread Manipulation with the Priority-Based Scheduler.
Thread_Control * _Scheduler_simple_SMP_Remove_processor(const Scheduler_Control *scheduler, struct Per_CPU_Control *cpu)
Removes an idle thread from the given cpu.
Definition: schedulersimplesmp.c:344
void _Scheduler_simple_SMP_Reconsider_help_request(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Reconsiders help.
Definition: schedulersimplesmp.c:291
Definition: thread.h:732
Per CPU Core Structure.
Definition: percpu.h:347
void _Scheduler_simple_SMP_Block(const Scheduler_Control *scheduler, Thread_Control *thread, Scheduler_Node *node)
Blocks a thread.
Definition: schedulersimplesmp.c:165
void _Scheduler_simple_SMP_Yield(const Scheduler_Control *scheduler, Thread_Control *thread, Scheduler_Node *node)
Definition: schedulersimplesmp.c:359
void _Scheduler_simple_SMP_Add_processor(const Scheduler_Control *scheduler, Thread_Control *idle)
Adds idle to scheduler.
Definition: schedulersimplesmp.c:328
Definition: schedulersimplesmp.h:54
Scheduler control.
Definition: scheduler.h:269
Scheduler node for per-thread data.
Definition: schedulernode.h:79
void _Scheduler_simple_SMP_Node_initialize(const Scheduler_Control *scheduler, Scheduler_Node *node, Thread_Control *the_thread, Priority_Control priority)
Initializes the node with the given attributes.
Definition: schedulersimplesmp.c:45
bool _Scheduler_simple_SMP_Ask_for_help(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Asks for help.
Definition: schedulersimplesmp.c:280
Constants and Structures Associated with the Scheduler.