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-1997. |
---|
8 | * On-Line Applications Research Corporation (OAR). |
---|
9 | * Copyright assigned to U.S. Government, 1994. |
---|
10 | * |
---|
11 | * The license and distribution terms for this file may be |
---|
12 | * found in the file LICENSE in this distribution or at |
---|
13 | * http://www.OARcorp.com/rtems/license.html. |
---|
14 | * |
---|
15 | * $Id$ |
---|
16 | */ |
---|
17 | |
---|
18 | #ifndef __RTEMS_ASR_h |
---|
19 | #define __RTEMS_ASR_h |
---|
20 | |
---|
21 | #ifdef __cplusplus |
---|
22 | extern "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 | |
---|
33 | typedef unsigned32 rtems_signal_set; |
---|
34 | |
---|
35 | /* |
---|
36 | * Return type for ASR Handler |
---|
37 | */ |
---|
38 | |
---|
39 | typedef void rtems_asr; |
---|
40 | |
---|
41 | /* |
---|
42 | * The following type corresponds to the applications asynchronous |
---|
43 | * signal processing routine. |
---|
44 | */ |
---|
45 | |
---|
46 | typedef 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 | |
---|
56 | typedef 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 | #ifndef __RTEMS_APPLICATION__ |
---|
104 | #include <rtems/rtems/asr.inl> |
---|
105 | #endif |
---|
106 | |
---|
107 | #ifdef __cplusplus |
---|
108 | } |
---|
109 | #endif |
---|
110 | |
---|
111 | #endif |
---|
112 | /* end of include file */ |
---|