RTEMS 6.1-rc5
Loading...
Searching...
No Matches
schedulersimple.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
13/*
14 * Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
15 *
16 * Redistribution and use in source and binary forms, with or without
17 * modification, are permitted provided that the following conditions
18 * are met:
19 * 1. Redistributions of source code must retain the above copyright
20 * notice, this list of conditions and the following disclaimer.
21 * 2. Redistributions in binary form must reproduce the above copyright
22 * notice, this list of conditions and the following disclaimer in the
23 * documentation and/or other materials provided with the distribution.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
29 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE.
36 */
37
38#ifndef _RTEMS_SCORE_SCHEDULERSIMPLE_H
39#define _RTEMS_SCORE_SCHEDULERSIMPLE_H
40
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
58#define SCHEDULER_SIMPLE_MAXIMUM_PRIORITY 255
59
63#define SCHEDULER_SIMPLE_ENTRY_POINTS \
64 { \
65 _Scheduler_simple_Initialize, /* initialize entry point */ \
66 _Scheduler_simple_Schedule, /* schedule entry point */ \
67 _Scheduler_simple_Yield, /* yield entry point */ \
68 _Scheduler_simple_Block, /* block entry point */ \
69 _Scheduler_simple_Unblock, /* unblock entry point */ \
70 _Scheduler_simple_Update_priority, /* update priority entry point */ \
71 _Scheduler_default_Map_priority, /* map priority entry point */ \
72 _Scheduler_default_Unmap_priority, /* unmap priority entry point */ \
73 SCHEDULER_DEFAULT_SMP_OPERATIONS \
74 _Scheduler_default_Node_initialize, /* node initialize entry point */ \
75 _Scheduler_default_Node_destroy, /* node destroy entry point */ \
76 _Scheduler_default_Release_job, /* new period of task */ \
77 _Scheduler_default_Cancel_job, /* cancel period of task */ \
78 _Scheduler_default_Start_idle /* start idle entry point */ \
79 SCHEDULER_DEFAULT_SET_AFFINITY_OPERATION \
80 }
81
85typedef struct {
90
96
104void _Scheduler_simple_Initialize( const Scheduler_Control *scheduler );
105
117 const Scheduler_Control *scheduler,
118 Thread_Control *the_thread
119);
120
129 const Scheduler_Control *scheduler,
130 Thread_Control *the_thread,
131 Scheduler_Node *node
132);
133
142 const Scheduler_Control *scheduler,
143 Thread_Control *the_thread,
144 Scheduler_Node *node
145);
146
155 const Scheduler_Control *scheduler,
156 Thread_Control *the_thread,
157 Scheduler_Node *node
158);
159
168 const Scheduler_Control *scheduler,
169 Thread_Control *the_thread,
170 Scheduler_Node *node
171);
172
175#ifdef __cplusplus
176}
177#endif
178
179#endif
180/* end of include file */
void _Scheduler_simple_Initialize(const Scheduler_Control *scheduler)
Initializes simple scheduler.
Definition: schedulersimple.c:45
void _Scheduler_simple_Block(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Blocks the thread.
Definition: schedulersimpleblock.c:44
void _Scheduler_simple_Unblock(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Unblocks the thread.
Definition: schedulersimpleunblock.c:45
void _Scheduler_simple_Schedule(const Scheduler_Control *scheduler, Thread_Control *the_thread)
Schedules threads.
Definition: schedulersimpleschedule.c:44
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:44
void _Scheduler_simple_Yield(const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node)
Performs the yield of a thread.
Definition: schedulersimpleyield.c:44
This header file provides interfaces of the Deterministic Priority Scheduler which are used by the im...
This header file provides interfaces of the Scheduler Handler which are used by the implementation an...
Scheduler context.
Definition: scheduler.h:318
Scheduler node for per-thread data.
Definition: schedulernode.h:94
Simple scheduler context.
Definition: schedulersimple.h:85
Scheduler_Context Base
Basic scheduler context.
Definition: schedulersimple.h:89
Chain_Control Ready
One ready queue for all ready threads.
Definition: schedulersimple.h:94
Scheduler control.
Definition: scheduler.h:337
Definition: thread.h:837
This union represents a chain control block.
Definition: chain.h:96