source: rtems/cpukit/score/include/rtems/score/schedulerprioritysmp.h @ e1598a6

4.115
Last change on this file since e1598a6 was e1598a6, checked in by Sebastian Huber <sebastian.huber@…>, on 04/04/14 at 08:56:36

score: Static scheduler configuration

Do not allocate the scheduler control structures from the workspace.
This is a preparation step for configuration of clustered/partitioned
schedulers on SMP.

  • Property mode set to 100644
File size: 3.2 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup ScoreSchedulerPrioritySMP
5 *
6 * @brief Deterministic Priority SMP Scheduler API
7 */
8
9/*
10 * Copyright (c) 2013 embedded brains GmbH.  All rights reserved.
11 *
12 *  embedded brains GmbH
13 *  Dornierstr. 4
14 *  82178 Puchheim
15 *  Germany
16 *  <rtems@embedded-brains.de>
17 *
18 * The license and distribution terms for this file may be
19 * found in the file LICENSE in this distribution or at
20 * http://www.rtems.org/license/LICENSE.
21 */
22
23#ifndef _RTEMS_SCORE_SCHEDULERPRIORITYSMP_H
24#define _RTEMS_SCORE_SCHEDULERPRIORITYSMP_H
25
26#include <rtems/score/scheduler.h>
27#include <rtems/score/schedulerpriority.h>
28#include <rtems/score/schedulersmp.h>
29
30#ifdef __cplusplus
31extern "C" {
32#endif /* __cplusplus */
33
34/**
35 * @defgroup ScoreSchedulerPrioritySMP Deterministic Priority SMP Scheduler
36 *
37 * @ingroup ScoreScheduler
38 *
39 * This is an implementation of the global fixed priority scheduler (G-FP).  It
40 * uses one ready chain per priority to ensure constant time insert operations.
41 * The scheduled chain uses linear insert operations and has at most processor
42 * count entries.  Since the processor and priority count are constants all
43 * scheduler operations complete in a bounded execution time.
44 *
45 * The thread preempt mode will be ignored.
46 *
47 * @{
48 */
49
50typedef struct {
51  Scheduler_SMP_Context    Base;
52  Priority_bit_map_Control Bit_map;
53  Chain_Control            Ready[ 0 ];
54} Scheduler_priority_SMP_Context;
55
56/**
57 * @brief Entry points for the Priority SMP Scheduler.
58 */
59#define SCHEDULER_PRIORITY_SMP_ENTRY_POINTS \
60  { \
61    _Scheduler_priority_SMP_Initialize, \
62    _Scheduler_priority_SMP_Schedule, \
63    _Scheduler_priority_SMP_Yield, \
64    _Scheduler_priority_SMP_Block, \
65    _Scheduler_priority_SMP_Enqueue_fifo, \
66    _Scheduler_priority_Allocate, \
67    _Scheduler_priority_Free, \
68    _Scheduler_priority_SMP_Update, \
69    _Scheduler_priority_SMP_Enqueue_fifo, \
70    _Scheduler_priority_SMP_Enqueue_lifo, \
71    _Scheduler_priority_SMP_Extract, \
72    _Scheduler_priority_Priority_compare, \
73    _Scheduler_default_Release_job, \
74    _Scheduler_default_Tick, \
75    _Scheduler_priority_SMP_Start_idle, \
76    _Scheduler_default_Get_affinity, \
77    _Scheduler_default_Set_affinity \
78  }
79
80void _Scheduler_priority_SMP_Initialize( const Scheduler_Control *scheduler );
81
82void _Scheduler_priority_SMP_Schedule(
83  const Scheduler_Control *scheduler,
84  Thread_Control *thread
85);
86
87void _Scheduler_priority_SMP_Block(
88  const Scheduler_Control *scheduler,
89  Thread_Control *thread
90);
91
92void _Scheduler_priority_SMP_Update(
93  const Scheduler_Control *scheduler,
94  Thread_Control *thread
95);
96
97void _Scheduler_priority_SMP_Enqueue_fifo(
98  const Scheduler_Control *scheduler,
99  Thread_Control *thread
100);
101
102void _Scheduler_priority_SMP_Enqueue_lifo(
103  const Scheduler_Control *scheduler,
104  Thread_Control *thread
105);
106
107void _Scheduler_priority_SMP_Extract(
108  const Scheduler_Control *scheduler,
109  Thread_Control *thread
110);
111
112void _Scheduler_priority_SMP_Yield(
113  const Scheduler_Control *scheduler,
114  Thread_Control *thread
115);
116
117void _Scheduler_priority_SMP_Start_idle(
118  const Scheduler_Control *scheduler,
119  Thread_Control *thread,
120  Per_CPU_Control *cpu
121);
122
123/** @} */
124
125#ifdef __cplusplus
126}
127#endif /* __cplusplus */
128
129#endif /* _RTEMS_SCORE_SCHEDULERPRIORITYSMP_H */
Note: See TracBrowser for help on using the repository browser.