1 | /* eventset.h |
---|
2 | * |
---|
3 | * This include file contains the information pertaining to the |
---|
4 | * Event Sets Handler. This handler provides methods for the manipulation |
---|
5 | * of event sets which will be sent and received by tasks. |
---|
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_EVENT_SET_h |
---|
19 | #define __RTEMS_EVENT_SET_h |
---|
20 | |
---|
21 | #ifdef __cplusplus |
---|
22 | extern "C" { |
---|
23 | #endif |
---|
24 | |
---|
25 | /* |
---|
26 | * The following defines the type used to control event sets. |
---|
27 | */ |
---|
28 | |
---|
29 | typedef unsigned32 rtems_event_set; |
---|
30 | |
---|
31 | /* |
---|
32 | * The following constants define the individual events which may |
---|
33 | * be used to compose an event set. |
---|
34 | */ |
---|
35 | |
---|
36 | #define RTEMS_PENDING_EVENTS 0 /* receive pending events */ |
---|
37 | #define RTEMS_ALL_EVENTS 0xFFFFFFFF |
---|
38 | |
---|
39 | #define RTEMS_EVENT_0 0x00000001 |
---|
40 | #define RTEMS_EVENT_1 0x00000002 |
---|
41 | #define RTEMS_EVENT_2 0x00000004 |
---|
42 | #define RTEMS_EVENT_3 0x00000008 |
---|
43 | #define RTEMS_EVENT_4 0x00000010 |
---|
44 | #define RTEMS_EVENT_5 0x00000020 |
---|
45 | #define RTEMS_EVENT_6 0x00000040 |
---|
46 | #define RTEMS_EVENT_7 0x00000080 |
---|
47 | #define RTEMS_EVENT_8 0x00000100 |
---|
48 | #define RTEMS_EVENT_9 0x00000200 |
---|
49 | #define RTEMS_EVENT_10 0x00000400 |
---|
50 | #define RTEMS_EVENT_11 0x00000800 |
---|
51 | #define RTEMS_EVENT_12 0x00001000 |
---|
52 | #define RTEMS_EVENT_13 0x00002000 |
---|
53 | #define RTEMS_EVENT_14 0x00004000 |
---|
54 | #define RTEMS_EVENT_15 0x00008000 |
---|
55 | #define RTEMS_EVENT_16 0x00010000 |
---|
56 | #define RTEMS_EVENT_17 0x00020000 |
---|
57 | #define RTEMS_EVENT_18 0x00040000 |
---|
58 | #define RTEMS_EVENT_19 0x00080000 |
---|
59 | #define RTEMS_EVENT_20 0x00100000 |
---|
60 | #define RTEMS_EVENT_21 0x00200000 |
---|
61 | #define RTEMS_EVENT_22 0x00400000 |
---|
62 | #define RTEMS_EVENT_23 0x00800000 |
---|
63 | #define RTEMS_EVENT_24 0x01000000 |
---|
64 | #define RTEMS_EVENT_25 0x02000000 |
---|
65 | #define RTEMS_EVENT_26 0x04000000 |
---|
66 | #define RTEMS_EVENT_27 0x08000000 |
---|
67 | #define RTEMS_EVENT_28 0x10000000 |
---|
68 | #define RTEMS_EVENT_29 0x20000000 |
---|
69 | #define RTEMS_EVENT_30 0x40000000 |
---|
70 | #define RTEMS_EVENT_31 0x80000000 |
---|
71 | |
---|
72 | |
---|
73 | /* |
---|
74 | * The following constant is the value of an event set which |
---|
75 | * has no events pending. |
---|
76 | */ |
---|
77 | |
---|
78 | #define EVENT_SETS_NONE_PENDING 0 |
---|
79 | |
---|
80 | /* |
---|
81 | * _Event_sets_Is_empty |
---|
82 | * |
---|
83 | * DESCRIPTION: |
---|
84 | * |
---|
85 | * This function returns TRUE if on events are posted in the event_set, |
---|
86 | * and FALSE otherwise. |
---|
87 | */ |
---|
88 | |
---|
89 | STATIC INLINE boolean _Event_sets_Is_empty( |
---|
90 | rtems_event_set the_event_set |
---|
91 | ); |
---|
92 | |
---|
93 | /* |
---|
94 | * _Event_sets_Post |
---|
95 | * |
---|
96 | * DESCRIPTION: |
---|
97 | * |
---|
98 | * This routine posts the given new_events into the event_set |
---|
99 | * passed in. The result is returned to the user in event_set. |
---|
100 | */ |
---|
101 | |
---|
102 | STATIC INLINE void _Event_sets_Post( |
---|
103 | rtems_event_set the_new_events, |
---|
104 | rtems_event_set *the_event_set |
---|
105 | ); |
---|
106 | |
---|
107 | /* |
---|
108 | * _Event_sets_Get |
---|
109 | * |
---|
110 | * DESCRIPTION: |
---|
111 | * |
---|
112 | * This function returns the events in event_condition which are |
---|
113 | * set in event_set. |
---|
114 | */ |
---|
115 | |
---|
116 | STATIC INLINE rtems_event_set _Event_sets_Get( |
---|
117 | rtems_event_set the_event_set, |
---|
118 | rtems_event_set the_event_condition |
---|
119 | ); |
---|
120 | |
---|
121 | /* |
---|
122 | * _Event_sets_Clear |
---|
123 | * |
---|
124 | * DESCRIPTION: |
---|
125 | * |
---|
126 | * This function removes the events in mask from the event_set |
---|
127 | * passed in. The result is returned to the user in event_set. |
---|
128 | */ |
---|
129 | |
---|
130 | STATIC INLINE rtems_event_set _Event_sets_Clear( |
---|
131 | rtems_event_set the_event_set, |
---|
132 | rtems_event_set the_mask |
---|
133 | ); |
---|
134 | |
---|
135 | #include <rtems/rtems/eventset.inl> |
---|
136 | |
---|
137 | #ifdef __cplusplus |
---|
138 | } |
---|
139 | #endif |
---|
140 | |
---|
141 | #endif |
---|
142 | /* end of include file */ |
---|