RTEMS 6.1-rc4
Loading...
Searching...
No Matches
eventimpl.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
12/* COPYRIGHT (c) 1989-2008.
13 * On-Line Applications Research Corporation (OAR).
14 *
15 * Redistribution and use in source and binary forms, with or without
16 * modification, are permitted provided that the following conditions
17 * are met:
18 * 1. Redistributions of source code must retain the above copyright
19 * notice, this list of conditions and the following disclaimer.
20 * 2. Redistributions in binary form must reproduce the above copyright
21 * notice, this list of conditions and the following disclaimer in the
22 * documentation and/or other materials provided with the distribution.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
28 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 * POSSIBILITY OF SUCH DAMAGE.
35 */
36
37#ifndef _RTEMS_RTEMS_EVENTIMPL_H
38#define _RTEMS_RTEMS_EVENTIMPL_H
39
41#include <rtems/score/thread.h>
42
43#ifdef __cplusplus
44extern "C" {
45#endif
46
87 rtems_event_set event_in,
88 rtems_option option_set,
89 rtems_interval ticks,
90 rtems_event_set *event_out,
91 Thread_Control *executing,
92 Event_Control *event,
93 Thread_Wait_flags wait_class,
94 States_Control block_state,
95 ISR_lock_Context *lock_context
96);
97
114 Thread_Control *the_thread,
115 rtems_event_set event_in,
116 Event_Control *event,
117 Thread_Wait_flags wait_class,
118 ISR_lock_Context *lock_context
119);
120
126static inline void _Event_Initialize( Event_Control *event )
127{
128 event->pending_events = 0;
129}
130
139static inline bool _Event_sets_Is_empty(
140 rtems_event_set the_event_set
141)
142{
143 return ( the_event_set == 0 );
144}
145
153static inline void _Event_sets_Post(
154 rtems_event_set the_new_events,
155 rtems_event_set *the_event_set
156)
157{
158 *the_event_set |= the_new_events;
159}
160
171static inline rtems_event_set _Event_sets_Get(
172 rtems_event_set the_event_set,
173 rtems_event_set the_event_condition
174)
175{
176 return ( the_event_set & the_event_condition );
177}
178
189static inline rtems_event_set _Event_sets_Clear(
190 rtems_event_set the_event_set,
191 rtems_event_set the_mask
192)
193{
194 return ( the_event_set & ~(the_mask) );
195}
196
199#ifdef __cplusplus
200}
201#endif
202
203#if defined(RTEMS_MULTIPROCESSING)
204#include <rtems/rtems/eventmp.h>
205#endif
206
207#endif
208/* end of include file */
This header file provides data structures used by the implementation and the Application Configuratio...
This header file provides the implementation interfaces of the Event Manager Multiprocessing (MP) Sup...
uint32_t rtems_event_set
This integer type represents a bit field which can hold exactly 32 individual events.
Definition: event.h:436
uint32_t rtems_option
This type represents a Classic API directive option set.
Definition: options.h:126
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:85
Watchdog_Interval rtems_interval
This type represents clock tick intervals.
Definition: types.h:114
rtems_status_code _Event_Seize(rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out, Thread_Control *executing, Event_Control *event, Thread_Wait_flags wait_class, States_Control block_state, ISR_lock_Context *lock_context)
Seizes a set of events.
Definition: eventseize.c:50
rtems_status_code _Event_Surrender(Thread_Control *the_thread, rtems_event_set event_in, Event_Control *event, Thread_Wait_flags wait_class, ISR_lock_Context *lock_context)
Surrenders a set of events.
Definition: eventsurrender.c:87
uint32_t States_Control
Definition: states.h:65
unsigned int Thread_Wait_flags
This type is able to contain several flags used to control the wait class and state of a thread.
Definition: thread.h:451
This header file provides interfaces of the Thread Handler which are used by the implementation and t...
This structure is used to manage a set of events.
Definition: eventdata.h:56
Local ISR lock context for acquire and release pairs.
Definition: isrlock.h:94
Definition: thread.h:837