RTEMS  5.0.0
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_Update_priority, /* update priority entry point */ \
48  _Scheduler_default_Map_priority, /* map priority entry point */ \
49  _Scheduler_default_Unmap_priority, /* unmap priority entry point */ \
50  SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELP \
51  _Scheduler_priority_Node_initialize, /* node initialize entry point */ \
52  _Scheduler_default_Node_destroy, /* node destroy entry point */ \
53  _Scheduler_default_Release_job, /* new period of task */ \
54  _Scheduler_default_Cancel_job, /* cancel period of task */ \
55  _Scheduler_default_Tick, /* tick entry point */ \
56  _Scheduler_default_Start_idle /* start idle entry point */ \
57  SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY \
58  }
59 
60 typedef struct {
65 
70 
74  Chain_Control Ready[ 0 ];
76 
80 typedef struct {
84  unsigned int current_priority;
85 
88 
92 
96 typedef struct {
101 
107 
112 void _Scheduler_priority_Initialize( const Scheduler_Control *scheduler );
113 
114 void _Scheduler_priority_Block(
115  const Scheduler_Control *scheduler,
116  Thread_Control *the_thread,
117  Scheduler_Node *node
118 );
119 
127  const Scheduler_Control *scheduler,
128  Thread_Control *the_thread
129 );
130 
131 void _Scheduler_priority_Unblock(
132  const Scheduler_Control *scheduler,
133  Thread_Control *the_thread,
134  Scheduler_Node *node
135 );
136 
137 void _Scheduler_priority_Update_priority(
138  const Scheduler_Control *scheduler,
139  Thread_Control *the_thread,
140  Scheduler_Node *base_node
141 );
142 
143 void _Scheduler_priority_Node_initialize(
144  const Scheduler_Control *scheduler,
145  Scheduler_Node *node,
146  Thread_Control *the_thread,
147  Priority_Control priority
148 );
149 
150 void _Scheduler_priority_Yield(
151  const Scheduler_Control *scheduler,
152  Thread_Control *the_thread,
153  Scheduler_Node *node
154 );
155 
158 #ifdef __cplusplus
159 }
160 #endif
161 
162 #endif
163 /* end of include file */
Chain_Control * ready_chain
Definition: schedulerpriority.h:87
Scheduler context.
Definition: scheduler.h:249
Definition: schedulerpriority.h:60
Definition: prioritybitmap.h:37
Priority_bit_map_Information Priority_map
Definition: schedulerpriority.h:90
Scheduler_Node Base
Basic scheduler node.
Definition: schedulerpriority.h:100
Definition: chain.h:83
unsigned int current_priority
The thread priority currently used by the scheduler.
Definition: schedulerpriority.h:84
uint64_t Priority_Control
The thread priority control.
Definition: priority.h:66
Definition: thread.h:728
Priority_bit_map_Control Bit_map
Bit map to indicate non-empty ready queues.
Definition: schedulerpriority.h:69
Data for ready queue operations.
Definition: schedulerpriority.h:80
Scheduler_priority_Ready_queue Ready_queue
The associated ready queue of this node.
Definition: schedulerpriority.h:105
Scheduler node specialization for Deterministic Priority schedulers.
Definition: schedulerpriority.h:96
Scheduler_Context Base
Basic scheduler context.
Definition: schedulerpriority.h:64
Manipulation Routines for the Bitmap Priority Queue Implementation.
Definition: prioritybitmap.h:59
Chain Handler API.
Scheduler control.
Definition: scheduler.h:266
Scheduler node for per-thread data.
Definition: schedulernode.h:65
Constants and Structures Associated with the Scheduler.
void _Scheduler_priority_Initialize(const Scheduler_Control *scheduler)
Initializes the priority scheduler. This routine initializes the priority scheduler.
Definition: schedulerpriority.c:23
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