RTEMS CPU Kit with SuperCore  4.11.2
schedulersimple.h
Go to the documentation of this file.
1 
10 /*
11  * Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
12  *
13  * The license and distribution terms for this file may be
14  * found in the file LICENSE in this distribution or at
15  * http://www.rtems.org/license/LICENSE.
16  */
17 
18 #ifndef _RTEMS_SCORE_SCHEDULERSIMPLE_H
19 #define _RTEMS_SCORE_SCHEDULERSIMPLE_H
20 
21 #include <rtems/score/scheduler.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
38 #define SCHEDULER_SIMPLE_ENTRY_POINTS \
39  { \
40  _Scheduler_simple_Initialize, /* initialize entry point */ \
41  _Scheduler_simple_Schedule, /* schedule entry point */ \
42  _Scheduler_simple_Yield, /* yield entry point */ \
43  _Scheduler_simple_Block, /* block entry point */ \
44  _Scheduler_simple_Unblock, /* unblock entry point */ \
45  _Scheduler_simple_Change_priority, /* change priority entry point */ \
46  SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELP \
47  _Scheduler_default_Node_initialize, /* node initialize entry point */ \
48  _Scheduler_default_Node_destroy, /* node destroy entry point */ \
49  _Scheduler_default_Update_priority, /* update priority entry point */ \
50  _Scheduler_priority_Priority_compare, /* compares two priorities */ \
51  _Scheduler_default_Release_job, /* new period of task */ \
52  _Scheduler_default_Tick, /* tick entry point */ \
53  _Scheduler_default_Start_idle /* start idle entry point */ \
54  SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY \
55  }
56 
60 typedef struct {
65 
71 
77 void _Scheduler_simple_Initialize( const Scheduler_Control *scheduler );
78 
88  const Scheduler_Control *scheduler,
89  Thread_Control *the_thread
90 );
91 
109 Scheduler_Void_or_thread _Scheduler_simple_Yield(
110  const Scheduler_Control *scheduler,
111  Thread_Control *the_thread
112 );
113 
126  const Scheduler_Control *scheduler,
127  Thread_Control *the_thread
128 );
129 
140 Scheduler_Void_or_thread _Scheduler_simple_Unblock(
141  const Scheduler_Control *scheduler,
142  Thread_Control *the_thread
143 );
144 
145 Scheduler_Void_or_thread _Scheduler_simple_Change_priority(
146  const Scheduler_Control *scheduler,
147  Thread_Control *the_thread,
148  Priority_Control new_priority,
149  bool prepend_it
150 );
151 
154 #ifdef __cplusplus
155 }
156 #endif
157 
158 #endif
159 /* end of include file */
Scheduler_Void_or_thread _Scheduler_simple_Yield(const Scheduler_Control *scheduler, Thread_Control *the_thread)
Invoked when a thread wishes to voluntarily transfer control of the processor to another thread in th...
Definition: schedulersimpleyield.c:23
Scheduler control.
Definition: scheduler.h:192
Scheduler_Context Base
Basic scheduler context.
Definition: schedulersimple.h:64
Scheduler context.
Definition: scheduler.h:180
Chain_Control Ready
One ready queue for all ready threads.
Definition: schedulersimple.h:69
This is used to manage a chain.
Definition: chain.h:83
Thread Manipulation with the Priority-Based Scheduler.
Scheduler_Void_or_thread _Scheduler_simple_Unblock(const Scheduler_Control *scheduler, Thread_Control *the_thread)
Unblock a simple-priority-based thread.
Definition: schedulersimpleunblock.c:24
Simple scheduler context.
Definition: schedulersimple.h:60
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
Constants and Structures Associated with the Scheduler.
void _Scheduler_simple_Initialize(const Scheduler_Control *scheduler)
Initialize simple scheduler.
Definition: schedulersimple.c:25
void _Scheduler_simple_Block(const Scheduler_Control *scheduler, Thread_Control *the_thread)
Remove a simple-priority-based thread from the queue.
Definition: schedulersimpleblock.c:24
void _Scheduler_simple_Schedule(const Scheduler_Control *scheduler, Thread_Control *the_thread)
This routine sets the heir thread to be the next ready thread on the ready queue by getting the first...
Definition: schedulersimpleschedule.c:23