source: rtems/cpukit/rtems/include/rtems/rtems/asr.h @ 3a4ae6c

4.104.114.84.95
Last change on this file since 3a4ae6c was 3a4ae6c, checked in by Joel Sherrill <joel.sherrill@…>, on 09/11/95 at 19:35:39

The word "RTEMS" almost completely removed from the core.

Configuration Table Template file added and all tests
modified to use this. All gvar.h and conftbl.h files
removed from test directories.

Configuration parameter maximum_devices added.

Core semaphore and mutex handlers added and RTEMS API Semaphore
Manager updated to reflect this.

Initialization sequence changed to invoke API specific initialization
routines. Initialization tasks table now owned by RTEMS Tasks Manager.

Added user extension for post-switch.

Utilized user extensions to implement API specific functionality
like signal dispatching.

Added extensions to the System Initialization Thread so that an
API can register a function to be invoked while the system
is being initialized. These are largely equivalent to the
pre-driver and post-driver hooks.

Added the Modules file oar-go32_p5, modified oar-go32, and modified
the file make/custom/go32.cfg to look at an environment varable which
determines what CPU model is being used.

All BSPs updated to reflect named devices and clock driver's IOCTL
used by the Shared Memory Driver. Also merged clock isr into
main file and removed ckisr.c where possible.

Updated spsize to reflect new and moved variables.

Makefiles for the executive source and include files updated to show
break down of files into Core, RTEMS API, and Neither.

Header and inline files installed into subdirectory based on whether
logically in the Core or a part of the RTEMS API.

  • Property mode set to 100644
File size: 4.3 KB
Line 
1/*  asr.h
2 *
3 *  This include file contains all the constants and structures associated
4 *  with the Asynchronous Signal Handler.  This Handler provides the low-level
5 *  support required by the Signal Manager.
6 *
7 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
8 *  On-Line Applications Research Corporation (OAR).
9 *  All rights assigned to U.S. Government, 1994.
10 *
11 *  This material may be reproduced by or for the U.S. Government pursuant
12 *  to the copyright license under the clause at DFARS 252.227-7013.  This
13 *  notice must appear in all copies of this file and its derivatives.
14 *
15 *  $Id$
16 */
17
18#ifndef __RTEMS_ASR_h
19#define __RTEMS_ASR_h
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25#include <rtems/rtems/modes.h>
26
27/*
28 *
29 *  The following type defines the control block used to manage
30 *  each signal set.
31 */
32
33typedef unsigned32 rtems_signal_set;
34
35/*
36 *  Return type for ASR Handler
37 */
38
39typedef void rtems_asr;
40
41/*
42 *  The following type corresponds to the applications asynchronous
43 *  signal processing routine.
44 */
45
46typedef rtems_asr ( *rtems_asr_entry )(
47                 rtems_signal_set
48             );
49
50/*
51 *
52 *  The following defines the control structure used to manage
53 *  signals.  Each thread has a copy of this record.
54 */
55
56typedef struct {
57  boolean           is_enabled;       /* are ASRs enabled currently? */
58  rtems_asr_entry   handler;          /* address of RTEMS_ASR */
59  Modes_Control     mode_set;         /* RTEMS_ASR mode */
60  rtems_signal_set  signals_posted;   /* signal set */
61  rtems_signal_set  signals_pending;  /* pending signal set */
62  unsigned32        nest_level;       /* nest level of RTEMS_ASR */
63}   ASR_Information;
64
65/*
66 *  The following constants define the individual signals which may
67 *  be used to compose a signal set.
68 */
69
70#define RTEMS_SIGNAL_0    0x00000001
71#define RTEMS_SIGNAL_1    0x00000002
72#define RTEMS_SIGNAL_2    0x00000004
73#define RTEMS_SIGNAL_3    0x00000008
74#define RTEMS_SIGNAL_4    0x00000010
75#define RTEMS_SIGNAL_5    0x00000020
76#define RTEMS_SIGNAL_6    0x00000040
77#define RTEMS_SIGNAL_7    0x00000080
78#define RTEMS_SIGNAL_8    0x00000100
79#define RTEMS_SIGNAL_9    0x00000200
80#define RTEMS_SIGNAL_10   0x00000400
81#define RTEMS_SIGNAL_11   0x00000800
82#define RTEMS_SIGNAL_12   0x00001000
83#define RTEMS_SIGNAL_13   0x00002000
84#define RTEMS_SIGNAL_14   0x00004000
85#define RTEMS_SIGNAL_15   0x00008000
86#define RTEMS_SIGNAL_16   0x00010000
87#define RTEMS_SIGNAL_17   0x00020000
88#define RTEMS_SIGNAL_18   0x00040000
89#define RTEMS_SIGNAL_19   0x00080000
90#define RTEMS_SIGNAL_20   0x00100000
91#define RTEMS_SIGNAL_21   0x00200000
92#define RTEMS_SIGNAL_22   0x00400000
93#define RTEMS_SIGNAL_23   0x00800000
94#define RTEMS_SIGNAL_24   0x01000000
95#define RTEMS_SIGNAL_25   0x02000000
96#define RTEMS_SIGNAL_26   0x04000000
97#define RTEMS_SIGNAL_27   0x08000000
98#define RTEMS_SIGNAL_28   0x10000000
99#define RTEMS_SIGNAL_29   0x20000000
100#define RTEMS_SIGNAL_30   0x40000000
101#define RTEMS_SIGNAL_31   0x80000000
102
103/*
104 *  _ASR_Initialize
105 *
106 *  DESCRIPTION:
107 *
108 *  This routine initializes the given RTEMS_ASR information record.
109 */
110
111STATIC INLINE void _ASR_Initialize (
112  ASR_Information *information
113);
114
115/*
116 *  _ASR_Swap_signals
117 *
118 *  DESCRIPTION:
119 *
120 *  This routine atomically swaps the pending and posted signal
121 *  sets.  This is done when the thread alters its mode in such a
122 *  way that the RTEMS_ASR disable/enable flag changes.
123 */
124
125STATIC INLINE void _ASR_Swap_signals (
126  ASR_Information *information
127);
128
129/*
130 *  _ASR_Is_null_handler
131 *
132 *  DESCRIPTION:
133 *
134 *  This function returns TRUE if the given asr_handler is NULL and
135 *  FALSE otherwise.
136 */
137
138STATIC INLINE boolean _ASR_Is_null_handler (
139  rtems_asr_entry asr_handler
140);
141
142/*
143 *  _ASR_Are_signals_pending
144 *
145 *  DESCRIPTION:
146 *
147 *  This function returns TRUE if there are signals pending in the
148 *  given RTEMS_ASR information record and FALSE otherwise.
149 */
150
151STATIC INLINE boolean _ASR_Are_signals_pending (
152  ASR_Information *information
153);
154
155/*
156 *  _ASR_Post_signals
157 *
158 *  DESCRIPTION:
159 *
160 *  This routine posts the given signals into the signal_set
161 *  passed in.  The result is returned to the user in signal_set.
162 *
163 *  NOTE:  This must be implemented as a macro.
164 */
165
166STATIC INLINE void _ASR_Post_signals(
167  rtems_signal_set  signals,
168  rtems_signal_set *signal_set
169);
170
171#include <rtems/rtems/asr.inl>
172
173#ifdef __cplusplus
174}
175#endif
176
177#endif
178/* end of include file */
Note: See TracBrowser for help on using the repository browser.