source: rtems/cpukit/include/rtems/posix/psignalimpl.h @ 21275b58

5
Last change on this file since 21275b58 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.1 KB
RevLine 
[f9340ed7]1/**
[cf301c9]2 * @file
3 *
4 * @brief POSIX Signals Support
[f9340ed7]5 *
6 * This include file defines internal information about POSIX signals.
7 */
8
9/*
[96281908]10 *  COPYRIGHT (c) 1989-2013.
[f9340ed7]11 *  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
[c499856]15 *  http://www.rtems.org/license/LICENSE.
[f9340ed7]16 */
17
18#ifndef _RTEMS_POSIX_PSIGNALIMPL_H
19#define _RTEMS_POSIX_PSIGNALIMPL_H
20
[e43f4758]21/**
22 * @defgroup POSIX_SIGNALS POSIX Signals Support
23 *
[a15eaaf]24 * @ingroup POSIXAPI
[e43f4758]25 *
26 * @brief Internal Information about POSIX Signals
[cf301c9]27 *
[e43f4758]28 */
[b697bc6]29/**@{**/
[e43f4758]30
[f9340ed7]31#include <rtems/posix/psignal.h>
32#include <rtems/posix/pthread.h>
33#include <rtems/posix/sigset.h>
[7d9fff6]34#include <rtems/score/isrlock.h>
[bd67d7d2]35#include <rtems/score/percpu.h>
[02c4c441]36#include <rtems/score/threadqimpl.h>
[f9340ed7]37
[1e1a91ed]38#define POSIX_SIGNALS_TQ_OPERATIONS &_Thread_queue_Operations_FIFO
39
[f9340ed7]40#define _States_Is_interruptible_signal( _states ) \
41  ( ((_states) & \
42    (STATES_WAITING_FOR_SIGNAL|STATES_INTERRUPTIBLE_BY_SIGNAL)) == \
43      (STATES_WAITING_FOR_SIGNAL|STATES_INTERRUPTIBLE_BY_SIGNAL))
44
45#define SIGACTION_TERMINATE \
46  { 0, SIGNAL_ALL_MASK, {_POSIX_signals_Abnormal_termination_handler} }
47#define SIGACTION_IGNORE \
48  { 0, SIGNAL_ALL_MASK, {SIG_IGN} }
49#define SIGACTION_STOP \
50  { 0, SIGNAL_ALL_MASK, {_POSIX_signals_Stop_handler} }
51#define SIGACTION_CONTINUE \
52  { 0, SIGNAL_ALL_MASK, {_POSIX_signals_Continue_handler} }
53
54#define SIG_ARRAY_MAX  (SIGRTMAX + 1)
55
56/*
57 *  Variables
58 */
59
60extern sigset_t  _POSIX_signals_Pending;
61
62extern const struct sigaction _POSIX_signals_Default_vectors[ SIG_ARRAY_MAX ];
63
64extern struct sigaction _POSIX_signals_Vectors[ SIG_ARRAY_MAX ];
65
66extern Thread_queue_Control _POSIX_signals_Wait_queue;
67
68extern Chain_Control _POSIX_signals_Inactive_siginfo;
69
70extern Chain_Control _POSIX_signals_Siginfo[ SIG_ARRAY_MAX ];
71
72/*
73 *  Internal routines
74 */
75
[93306058]76RTEMS_INLINE_ROUTINE void _POSIX_signals_Acquire(
77  Thread_queue_Context *queue_context
78)
79{
[114e408]80  _Thread_queue_Acquire( &_POSIX_signals_Wait_queue, queue_context );
[93306058]81}
82
83RTEMS_INLINE_ROUTINE void _POSIX_signals_Release(
84  Thread_queue_Context *queue_context
85)
86{
[114e408]87  _Thread_queue_Release( &_POSIX_signals_Wait_queue, queue_context );
[93306058]88}
[7d9fff6]89
[d86308b]90/**
[cf301c9]91 * @brief Unlock POSIX signals thread.
[d86308b]92 */
[f9340ed7]93bool _POSIX_signals_Unblock_thread(
94  Thread_Control  *the_thread,
95  int              signo,
96  siginfo_t       *info
97);
98
[810ecf0]99/**
[cf301c9]100 * @brief Clear POSIX signals.
[810ecf0]101 */
[f9340ed7]102bool _POSIX_signals_Clear_signals(
103  POSIX_API_Control  *api,
104  int                 signo,
105  siginfo_t          *info,
106  bool                is_global,
[7d9fff6]107  bool                check_blocked,
108  bool                do_signals_acquire_release
[f9340ed7]109);
110
[3c293cc]111int _POSIX_signals_Send(
[f9340ed7]112  pid_t               pid,
113  int                 sig,
114  const union sigval *value
115);
116
[e49a36cb]117/**
[cf301c9]118 *  @brief Set POSIX process signals.
[e49a36cb]119 */
[f9340ed7]120void _POSIX_signals_Set_process_signals(
121  sigset_t   mask
122);
123
124void _POSIX_signals_Clear_process_signals(
125  int        signo
126);
127
128/*
129 *  Default signal handlers
130 */
131
132#define _POSIX_signals_Stop_handler NULL
133#define _POSIX_signals_Continue_handler NULL
134
135void _POSIX_signals_Abnormal_termination_handler( int signo );
136
[cf301c9]137/** @} */
138
[f9340ed7]139#endif
140/* end of file */
Note: See TracBrowser for help on using the repository browser.