RTEMS  5.0.0
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 
52 typedef struct {
54  Chain_Control Ready;
56 
57 #define SCHEDULER_SIMPLE_SMP_MAXIMUM_PRIORITY 255
58 
62 #define SCHEDULER_SIMPLE_SMP_ENTRY_POINTS \
63  { \
64  _Scheduler_simple_SMP_Initialize, \
65  _Scheduler_default_Schedule, \
66  _Scheduler_simple_SMP_Yield, \
67  _Scheduler_simple_SMP_Block, \
68  _Scheduler_simple_SMP_Unblock, \
69  _Scheduler_simple_SMP_Update_priority, \
70  _Scheduler_default_Map_priority, \
71  _Scheduler_default_Unmap_priority, \
72  _Scheduler_simple_SMP_Ask_for_help, \
73  _Scheduler_simple_SMP_Reconsider_help_request, \
74  _Scheduler_simple_SMP_Withdraw_node, \
75  _Scheduler_default_Pin_or_unpin, \
76  _Scheduler_default_Pin_or_unpin, \
77  _Scheduler_simple_SMP_Add_processor, \
78  _Scheduler_simple_SMP_Remove_processor, \
79  _Scheduler_simple_SMP_Node_initialize, \
80  _Scheduler_default_Node_destroy, \
81  _Scheduler_default_Release_job, \
82  _Scheduler_default_Cancel_job, \
83  _Scheduler_default_Tick, \
84  _Scheduler_SMP_Start_idle \
85  SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY \
86  }
87 
88 void _Scheduler_simple_SMP_Initialize( const Scheduler_Control *scheduler );
89 
90 void _Scheduler_simple_SMP_Node_initialize(
91  const Scheduler_Control *scheduler,
92  Scheduler_Node *node,
93  Thread_Control *the_thread,
94  Priority_Control priority
95 );
96 
97 void _Scheduler_simple_SMP_Block(
98  const Scheduler_Control *scheduler,
99  Thread_Control *thread,
100  Scheduler_Node *node
101 );
102 
103 void _Scheduler_simple_SMP_Unblock(
104  const Scheduler_Control *scheduler,
105  Thread_Control *thread,
106  Scheduler_Node *node
107 );
108 
109 void _Scheduler_simple_SMP_Update_priority(
110  const Scheduler_Control *scheduler,
111  Thread_Control *the_thread,
112  Scheduler_Node *node
113 );
114 
115 bool _Scheduler_simple_SMP_Ask_for_help(
116  const Scheduler_Control *scheduler,
117  Thread_Control *the_thread,
118  Scheduler_Node *node
119 );
120 
121 void _Scheduler_simple_SMP_Reconsider_help_request(
122  const Scheduler_Control *scheduler,
123  Thread_Control *the_thread,
124  Scheduler_Node *node
125 );
126 
127 void _Scheduler_simple_SMP_Withdraw_node(
128  const Scheduler_Control *scheduler,
129  Thread_Control *the_thread,
130  Scheduler_Node *node,
131  Thread_Scheduler_state next_state
132 );
133 
134 void _Scheduler_simple_SMP_Add_processor(
135  const Scheduler_Control *scheduler,
136  Thread_Control *idle
137 );
138 
139 Thread_Control *_Scheduler_simple_SMP_Remove_processor(
140  const Scheduler_Control *scheduler,
141  struct Per_CPU_Control *cpu
142 );
143 
144 void _Scheduler_simple_SMP_Yield(
145  const Scheduler_Control *scheduler,
146  Thread_Control *thread,
147  Scheduler_Node *node
148 );
149 
152 #ifdef __cplusplus
153 }
154 #endif
155 
156 #endif
157 /* end of include file */
Scheduler context specialization for SMP schedulers.
Definition: schedulersmp.h:44
SMP Scheduler API.
Definition: chain.h:83
Thread Manipulation with the Priority-Based Scheduler.
uint64_t Priority_Control
The thread priority control.
Definition: priority.h:66
Definition: thread.h:728
Per CPU Core Structure.
Definition: percpu.h:290
Definition: schedulersimplesmp.h:52
Scheduler control.
Definition: scheduler.h:266
Scheduler node for per-thread data.
Definition: schedulernode.h:65
Constants and Structures Associated with the Scheduler.