RTEMS: cpukit/include/rtems/score/schedulersimple.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
schedulersimple.h
Go to the documentation of this file.
1
12/*
13 * Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
14 *
15 * The license and distribution terms for this file may be
16 * found in the file LICENSE in this distribution or at
17 * http://www.rtems.org/license/LICENSE.
18 */
19
20#ifndef _RTEMS_SCORE_SCHEDULERSIMPLE_H
21#define _RTEMS_SCORE_SCHEDULERSIMPLE_H
22
23#include <rtems/score/scheduler.h>
24#include <rtems/score/schedulerpriority.h>
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
40#define SCHEDULER_SIMPLE_MAXIMUM_PRIORITY 255
41
45#define SCHEDULER_SIMPLE_ENTRY_POINTS \
46 { \
47 _Scheduler_simple_Initialize, /* initialize entry point */ \
48 _Scheduler_simple_Schedule, /* schedule entry point */ \
49 _Scheduler_simple_Yield, /* yield entry point */ \
50 _Scheduler_simple_Block, /* block entry point */ \
51 _Scheduler_simple_Unblock, /* unblock entry point */ \
52 _Scheduler_simple_Update_priority, /* update priority entry point */ \
53 _Scheduler_default_Map_priority, /* map priority entry point */ \
54 _Scheduler_default_Unmap_priority, /* unmap priority entry point */ \
55 SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELP \
56 _Scheduler_default_Node_initialize, /* node initialize entry point */ \
57 _Scheduler_default_Node_destroy, /* node destroy entry point */ \
58 _Scheduler_default_Release_job, /* new period of task */ \
59 _Scheduler_default_Cancel_job, /* cancel period of task */ \
60 _Scheduler_default_Tick, /* tick entry point */ \
61 _Scheduler_default_Start_idle /* start idle entry point */ \
62 SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY \
63 }
64
68 typedef struct {
72 Scheduler_Context Base;
73
77 Chain_Control Ready;
78} Scheduler_simple_Context;
79
87void _Scheduler_simple_Initialize( const Scheduler_Control *scheduler );
88
99void _Scheduler_simple_Schedule(
100 const Scheduler_Control *scheduler,
101 Thread_Control *the_thread
102);
103
111void _Scheduler_simple_Yield(
112 const Scheduler_Control *scheduler,
113 Thread_Control *the_thread,
114 Scheduler_Node *node
115);
116
124void _Scheduler_simple_Block(
125 const Scheduler_Control *scheduler,
126 Thread_Control *the_thread,
127 Scheduler_Node *node
128);
129
137void _Scheduler_simple_Unblock(
138 const Scheduler_Control *scheduler,
139 Thread_Control *the_thread,
140 Scheduler_Node *node
141);
142
150void _Scheduler_simple_Update_priority(
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 */
_Scheduler_simple_Initialize
void _Scheduler_simple_Initialize(const Scheduler_Control *scheduler)
Initializes simple scheduler.
Definition: schedulersimple.c:25
_Scheduler_simple_Block
void _Scheduler_simple_Block(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Blocks the thread.
Definition: schedulersimpleblock.c:24
_Scheduler_simple_Unblock
void _Scheduler_simple_Unblock(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Unblocks the thread.
Definition: schedulersimpleunblock.c:25
_Scheduler_simple_Schedule
void _Scheduler_simple_Schedule(const Scheduler_Control *scheduler, Thread_Control *the_thread)
Schedules threads.
Definition: schedulersimpleschedule.c:24
_Scheduler_simple_Update_priority
void _Scheduler_simple_Update_priority(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Updates the priority of the node.
Definition: schedulersimplechangepriority.c:24
_Scheduler_simple_Yield
void _Scheduler_simple_Yield(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Performs the yield of a thread.
Definition: schedulersimpleyield.c:24
schedulerpriority.h
Thread Manipulation with the Priority-Based Scheduler.
scheduler.h
Constants and Structures Associated with the Scheduler.
Scheduler_Context
Scheduler context.
Definition: scheduler.h:252
Scheduler_Node
Scheduler node for per-thread data.
Definition: schedulernode.h:79
Scheduler_simple_Context
Simple scheduler context.
Definition: schedulersimple.h:68
Scheduler_simple_Context::Base
Scheduler_Context Base
Basic scheduler context.
Definition: schedulersimple.h:72
Scheduler_simple_Context::Ready
Chain_Control Ready
One ready queue for all ready threads.
Definition: schedulersimple.h:77
_Scheduler_Control
Scheduler control.
Definition: scheduler.h:269
_Thread_Control
Definition: thread.h:732
Chain_Control
Definition: chain.h:86