source: rtems/cpukit/include/rtems/score/schedulerpriority.h @ 878487b0

5
Last change on this file since 878487b0 was 2afb22b, checked in by Chris Johns <chrisj@…>, on 12/23/17 at 07:18:56

Remove make preinstall

A speciality of the RTEMS build system was the make preinstall step. It
copied header files from arbitrary locations into the build tree. The
header files were included via the -Bsome/build/tree/path GCC command
line option.

This has at least seven problems:

  • The make preinstall step itself needs time and disk space.
  • Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error.
  • There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult.
  • The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit.
  • An introduction of a new build system is difficult.
  • Include paths specified by the -B option are system headers. This may suppress warnings.
  • The parallel build had sporadic failures on some hosts.

This patch removes the make preinstall step. All installed header
files are moved to dedicated include directories in the source tree.
Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc,
etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g.
erc32, imx, qoriq, etc.

The new cpukit include directories are:

  • cpukit/include
  • cpukit/score/cpu/@RTEMS_CPU@/include
  • cpukit/libnetworking

The new BSP include directories are:

  • bsps/include
  • bsps/@RTEMS_CPU@/include
  • bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include

There are build tree include directories for generated files.

The include directory order favours the most general header file, e.g.
it is not possible to override general header files via the include path
order.

The "bootstrap -p" option was removed. The new "bootstrap -H" option
should be used to regenerate the "headers.am" files.

Update #3254.

  • Property mode set to 100644
File size: 4.5 KB
Line 
1/**
2 *  @file  rtems/score/schedulerpriority.h
3 *
4 *  @brief Thread Manipulation with the Priority-Based Scheduler
5 *
6 *  This include file contains all the constants and structures associated
7 *  with the manipulation of threads for the priority-based scheduler.
8 */
9
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>
23#include <rtems/score/prioritybitmap.h>
24#include <rtems/score/scheduler.h>
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30/**
31 * @defgroup ScoreSchedulerDPS Deterministic Priority Scheduler
32 *
33 * @ingroup ScoreScheduler
34 */
35/**@{*/
36
37/**
38 *  Entry points for the Deterministic Priority Based Scheduler.
39 */
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
60typedef struct {
61  /**
62   * @brief Basic scheduler context.
63   */
64  Scheduler_Context Base;
65
66  /**
67   * @brief Bit map to indicate non-empty ready queues.
68   */
69  Priority_bit_map_Control Bit_map;
70
71  /**
72   * @brief One ready queue per priority level.
73   */
74  Chain_Control Ready[ 0 ];
75} Scheduler_priority_Context;
76
77/**
78 * @brief Data for ready queue operations.
79 */
80typedef struct {
81  /**
82   * @brief The thread priority currently used by the scheduler.
83   */
84  unsigned int current_priority;
85
86  /** This field points to the Ready FIFO for this thread's priority. */
87  Chain_Control                        *ready_chain;
88
89  /** This field contains precalculated priority map indices. */
90  Priority_bit_map_Information          Priority_map;
91} Scheduler_priority_Ready_queue;
92
93/**
94 * @brief Scheduler node specialization for Deterministic Priority schedulers.
95 */
96typedef struct {
97  /**
98   * @brief Basic scheduler node.
99   */
100  Scheduler_Node Base;
101
102  /**
103   * @brief The associated ready queue of this node.
104   */
105  Scheduler_priority_Ready_queue Ready_queue;
106} Scheduler_priority_Node;
107
108/**
109 * @brief Initializes the priority scheduler.
110 * This routine initializes the priority scheduler.
111 */
112void _Scheduler_priority_Initialize( const Scheduler_Control *scheduler );
113
114void _Scheduler_priority_Block(
115  const Scheduler_Control *scheduler,
116  Thread_Control          *the_thread,
117  Scheduler_Node          *node
118);
119
120/**
121 *  @brief Sets the heir thread to be the next ready thread.
122 *
123 *  This kernel routine sets the heir thread to be the next ready thread
124 *  by invoking the_scheduler->ready_queue->operations->first().
125 */
126void _Scheduler_priority_Schedule(
127  const Scheduler_Control *scheduler,
128  Thread_Control          *the_thread
129);
130
131void _Scheduler_priority_Unblock(
132  const Scheduler_Control *scheduler,
133  Thread_Control          *the_thread,
134  Scheduler_Node          *node
135);
136
137void _Scheduler_priority_Update_priority(
138  const Scheduler_Control *scheduler,
139  Thread_Control          *the_thread,
140  Scheduler_Node          *base_node
141);
142
143void _Scheduler_priority_Node_initialize(
144  const Scheduler_Control *scheduler,
145  Scheduler_Node          *node,
146  Thread_Control          *the_thread,
147  Priority_Control         priority
148);
149
150void _Scheduler_priority_Yield(
151  const Scheduler_Control *scheduler,
152  Thread_Control          *the_thread,
153  Scheduler_Node          *node
154);
155
156/**@}*/
157
158#ifdef __cplusplus
159}
160#endif
161
162#endif
163/* end of include file */
Note: See TracBrowser for help on using the repository browser.