RTEMS CPU Kit with SuperCore  4.11.2
schedulerpriority.h
Go to the documentation of this file.
1 
10 /*
11  * Copryight (c) 2010 Gedare Bloom.
12  * Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
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_SCHEDULERPRIORITY_H
20 #define _RTEMS_SCORE_SCHEDULERPRIORITY_H
21 
22 #include <rtems/score/chain.h>
24 #include <rtems/score/scheduler.h>
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
40 #define SCHEDULER_PRIORITY_ENTRY_POINTS \
41  { \
42  _Scheduler_priority_Initialize, /* initialize entry point */ \
43  _Scheduler_priority_Schedule, /* schedule entry point */ \
44  _Scheduler_priority_Yield, /* yield entry point */ \
45  _Scheduler_priority_Block, /* block entry point */ \
46  _Scheduler_priority_Unblock, /* unblock entry point */ \
47  _Scheduler_priority_Change_priority, /* change priority entry point */ \
48  SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELP \
49  _Scheduler_default_Node_initialize, /* node initialize entry point */ \
50  _Scheduler_default_Node_destroy, /* node destroy entry point */ \
51  _Scheduler_priority_Update_priority, /* update priority entry point */ \
52  _Scheduler_priority_Priority_compare, /* compares two priorities */ \
53  _Scheduler_default_Release_job, /* new period of task */ \
54  _Scheduler_default_Tick, /* tick entry point */ \
55  _Scheduler_default_Start_idle /* start idle entry point */ \
56  SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY \
57  }
58 
59 typedef struct {
64 
69 
73  Chain_Control Ready[ 0 ];
75 
79 typedef struct {
82 
86 
90 typedef struct {
95 
101 
106 void _Scheduler_priority_Initialize( const Scheduler_Control *scheduler );
107 
120  const Scheduler_Control *scheduler,
121  Thread_Control *the_thread
122 );
123 
131  const Scheduler_Control *scheduler,
132  Thread_Control *the_thread
133 );
134 
140  const Scheduler_Control *scheduler,
141  Thread_Control *the_thread,
142  Priority_Control new_priority
143 );
144 
155 Scheduler_Void_or_thread _Scheduler_priority_Unblock(
156  const Scheduler_Control *scheduler,
157  Thread_Control *the_thread
158 );
159 
160 Scheduler_Void_or_thread _Scheduler_priority_Change_priority(
161  const Scheduler_Control *scheduler,
162  Thread_Control *the_thread,
163  Priority_Control new_priority,
164  bool prepend_it
165 );
166 
187 Scheduler_Void_or_thread _Scheduler_priority_Yield(
188  const Scheduler_Control *scheduler,
189  Thread_Control *the_thread
190 );
191 
200  Priority_Control p1,
202 );
203 
206 #ifdef __cplusplus
207 }
208 #endif
209 
210 #endif
211 /* end of include file */
Scheduler control.
Definition: scheduler.h:192
int _Scheduler_priority_Priority_compare(Priority_Control p1, Priority_Control p2)
Compare two priorities.
Definition: schedulerpriorityprioritycompare.c:23
Chain_Control * ready_chain
This field points to the Ready FIFO for this thread&#39;s priority.
Definition: schedulerpriority.h:81
Scheduler context.
Definition: scheduler.h:180
Definition: schedulerpriority.h:59
void _Scheduler_priority_Block(const Scheduler_Control *scheduler, Thread_Control *the_thread)
Removes the_thread from the scheduling decision.
Definition: schedulerpriorityblock.c:25
Definition: prioritybitmap.h:40
Priority_bit_map_Information Priority_map
This field contains precalculated priority map indices.
Definition: schedulerpriority.h:84
Scheduler_Node Base
Basic scheduler node.
Definition: schedulerpriority.h:94
This is used to manage a chain.
Definition: chain.h:83
uint32_t Priority_Control
The following type defines the control block used to manage thread priorities.
Definition: priority.h:56
This structure defines the Thread Control Block (TCB).
Definition: thread.h:671
Priority_bit_map_Control Bit_map
Bit map to indicate non-empty ready queues.
Definition: schedulerpriority.h:68
Data for ready queue operations.
Definition: schedulerpriority.h:79
Scheduler_Void_or_thread _Scheduler_priority_Unblock(const Scheduler_Control *scheduler, Thread_Control *the_thread)
Add the_thread to the scheduling decision.
Definition: schedulerpriorityunblock.c:25
Scheduler_priority_Ready_queue Ready_queue
The associated ready queue of this node.
Definition: schedulerpriority.h:99
Constants and Structures Associated with the Scheduler.
Scheduler node specialization for Deterministic Priority schedulers.
Definition: schedulerpriority.h:90
Scheduler_Context Base
Basic scheduler context.
Definition: schedulerpriority.h:63
void _Scheduler_priority_Update_priority(const Scheduler_Control *scheduler, Thread_Control *the_thread, Priority_Control new_priority)
Updates the scheduler node to reflect the new priority of the thread.
Definition: schedulerpriorityupdate.c:23
Manipulation Routines for the Bitmap Priority Queue Implementation.
The following record defines the information associated with each thread to manage its interaction wi...
Definition: prioritybitmap.h:62
Chain Handler API.
Scheduler node for per-thread data.
Definition: scheduler.h:281
Scheduler_Void_or_thread _Scheduler_priority_Yield(const Scheduler_Control *scheduler, Thread_Control *the_thread)
The specified THREAD yields.
Definition: schedulerpriorityyield.c:24
void _Scheduler_priority_Initialize(const Scheduler_Control *scheduler)
Initializes the priority scheduler.
Definition: schedulerpriority.c:24
void _Scheduler_priority_Schedule(const Scheduler_Control *scheduler, Thread_Control *the_thread)
Sets the heir thread to be the next ready thread.
Definition: schedulerpriorityschedule.c:23