source: rtems/cpukit/include/rtems/score/schedulersimple.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: 3.5 KB
Line 
1/**
2 *  @file  rtems/score/schedulersimple.h
3 *
4 *  @brief Manipulation of Threads Simple-Priority-Based Ready Queue
5 *
6 *  This include file contains all the constants and structures associated
7 *  with the manipulation of threads on a simple-priority-based ready queue.
8 */
9
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>
22#include <rtems/score/schedulerpriority.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28/**
29 *  @defgroup ScoreSchedulerSimple Simple Priority Scheduler
30 *
31 *  @ingroup ScoreScheduler
32 */
33/**@{*/
34
35#define SCHEDULER_SIMPLE_MAXIMUM_PRIORITY 255
36
37/**
38 *  Entry points for Scheduler Simple
39 */
40#define SCHEDULER_SIMPLE_ENTRY_POINTS \
41  { \
42    _Scheduler_simple_Initialize,         /* initialize entry point */ \
43    _Scheduler_simple_Schedule,           /* schedule entry point */ \
44    _Scheduler_simple_Yield,              /* yield entry point */ \
45    _Scheduler_simple_Block,              /* block entry point */ \
46    _Scheduler_simple_Unblock,            /* unblock entry point */ \
47    _Scheduler_simple_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_default_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
60/**
61 * @brief Simple scheduler context.
62 */
63typedef struct {
64  /**
65   * @brief Basic scheduler context.
66   */
67  Scheduler_Context Base;
68
69  /**
70   * @brief One ready queue for all ready threads.
71   */
72  Chain_Control Ready;
73} Scheduler_simple_Context;
74
75/**
76 *  @brief Initialize simple scheduler.
77 *
78 *  This routine initializes the simple scheduler.
79 */
80void _Scheduler_simple_Initialize( const Scheduler_Control *scheduler );
81
82/**
83 *  This routine sets the heir thread to be the next ready thread
84 *  on the ready queue by getting the first node in the scheduler
85 *  information.
86 *
87 *  @param[in] scheduler The scheduler instance.
88 *  @param[in] the_thread causing the scheduling operation.
89 */
90void _Scheduler_simple_Schedule(
91  const Scheduler_Control *scheduler,
92  Thread_Control          *the_thread
93);
94
95void _Scheduler_simple_Yield(
96  const Scheduler_Control *scheduler,
97  Thread_Control          *the_thread,
98  Scheduler_Node          *node
99);
100
101void _Scheduler_simple_Block(
102  const Scheduler_Control *scheduler,
103  Thread_Control          *the_thread,
104  Scheduler_Node          *node
105);
106
107void _Scheduler_simple_Unblock(
108  const Scheduler_Control *scheduler,
109  Thread_Control          *the_thread,
110  Scheduler_Node          *node
111);
112
113void _Scheduler_simple_Update_priority(
114  const Scheduler_Control *scheduler,
115  Thread_Control          *the_thread,
116  Scheduler_Node          *node
117);
118
119/**@}*/
120
121#ifdef __cplusplus
122}
123#endif
124
125#endif
126/* end of include file */
Note: See TracBrowser for help on using the repository browser.