source: rtems/cpukit/include/rtems/rtems/event.h @ b35ac99

Last change on this file since b35ac99 was b35ac99, checked in by Sebastian Huber <sebastian.huber@…>, on 01/25/21 at 08:27:22

rtems: Add "Notes" paragraph header

Place the paragraphs in the same order as the directive documentation in
the RTEMS Classic API Guide.

Update #3993.

  • Property mode set to 100644
File size: 20.8 KB
Line 
1/* SPDX-License-Identifier: BSD-2-Clause */
2
3/**
4 * @file
5 *
6 * @ingroup RTEMSImplClassicEvent
7 *
8 * @brief This header file provides the Event Manager API.
9 */
10
11/*
12 * Copyright (C) 2014, 2020 embedded brains GmbH (http://www.embedded-brains.de)
13 * Copyright (C) 1988, 2008 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/*
38 * This file is part of the RTEMS quality process and was automatically
39 * generated.  If you find something that needs to be fixed or
40 * worded better please post a report or patch to an RTEMS mailing list
41 * or raise a bug report:
42 *
43 * https://www.rtems.org/bugs.html
44 *
45 * For information on updating and regenerating please refer to the How-To
46 * section in the Software Requirements Engineering chapter of the
47 * RTEMS Software Engineering manual.  The manual is provided as a part of
48 * a release.  For development sources please refer to the online
49 * documentation at:
50 *
51 * https://docs.rtems.org
52 */
53
54/* Generated from spec:/rtems/event/if/header */
55
56#ifndef _RTEMS_RTEMS_EVENT_H
57#define _RTEMS_RTEMS_EVENT_H
58
59#include <stdint.h>
60#include <rtems/rtems/options.h>
61#include <rtems/rtems/status.h>
62#include <rtems/rtems/types.h>
63
64#ifdef __cplusplus
65extern "C" {
66#endif
67
68/* Generated from spec:/rtems/event/if/group */
69
70/**
71 * @defgroup RTEMSAPIClassicEvent Event Manager
72 *
73 * @ingroup RTEMSAPIClassic
74 *
75 * @brief The Event Manager provides a high performance method of inter-task
76 *   communication and synchronization.
77 */
78
79/* Generated from spec:/rtems/event/if/all-events */
80
81/**
82 * @ingroup RTEMSAPIClassicEvent
83 *
84 * @brief This event set constant represents all events of an event set.
85 *
86 * This event set constant is equal to the bitwise or of #RTEMS_EVENT_0,
87 * #RTEMS_EVENT_1, #RTEMS_EVENT_2, #RTEMS_EVENT_3, #RTEMS_EVENT_4,
88 * #RTEMS_EVENT_5, #RTEMS_EVENT_6, #RTEMS_EVENT_7, #RTEMS_EVENT_8,
89 * #RTEMS_EVENT_9, #RTEMS_EVENT_10, #RTEMS_EVENT_11, #RTEMS_EVENT_12,
90 * #RTEMS_EVENT_13, #RTEMS_EVENT_14, #RTEMS_EVENT_15, #RTEMS_EVENT_16,
91 * #RTEMS_EVENT_17, #RTEMS_EVENT_18, #RTEMS_EVENT_19, #RTEMS_EVENT_20,
92 * #RTEMS_EVENT_21, #RTEMS_EVENT_22, #RTEMS_EVENT_23, #RTEMS_EVENT_24,
93 * #RTEMS_EVENT_25, #RTEMS_EVENT_26, #RTEMS_EVENT_27, #RTEMS_EVENT_28,
94 * #RTEMS_EVENT_29, #RTEMS_EVENT_30, and #RTEMS_EVENT_31.
95 */
96#define RTEMS_ALL_EVENTS 0xffffffff
97
98/* Generated from spec:/rtems/event/if/event-00 */
99
100/**
101 * @ingroup RTEMSAPIClassicEvent
102 *
103 * @brief This event set constant represents the bit in the event set
104 *   associated with event 0.
105 */
106#define RTEMS_EVENT_0 0x00000001
107
108/* Generated from spec:/rtems/event/if/event-01 */
109
110/**
111 * @ingroup RTEMSAPIClassicEvent
112 *
113 * @brief This event set constant represents the bit in the event set
114 *   associated with event 1.
115 */
116#define RTEMS_EVENT_1 0x00000002
117
118/* Generated from spec:/rtems/event/if/event-02 */
119
120/**
121 * @ingroup RTEMSAPIClassicEvent
122 *
123 * @brief This event set constant represents the bit in the event set
124 *   associated with event 2.
125 */
126#define RTEMS_EVENT_2 0x00000004
127
128/* Generated from spec:/rtems/event/if/event-03 */
129
130/**
131 * @ingroup RTEMSAPIClassicEvent
132 *
133 * @brief This event set constant represents the bit in the event set
134 *   associated with event 3.
135 */
136#define RTEMS_EVENT_3 0x00000008
137
138/* Generated from spec:/rtems/event/if/event-04 */
139
140/**
141 * @ingroup RTEMSAPIClassicEvent
142 *
143 * @brief This event set constant represents the bit in the event set
144 *   associated with event 4.
145 */
146#define RTEMS_EVENT_4 0x00000010
147
148/* Generated from spec:/rtems/event/if/event-05 */
149
150/**
151 * @ingroup RTEMSAPIClassicEvent
152 *
153 * @brief This event set constant represents the bit in the event set
154 *   associated with event 5.
155 */
156#define RTEMS_EVENT_5 0x00000020
157
158/* Generated from spec:/rtems/event/if/event-06 */
159
160/**
161 * @ingroup RTEMSAPIClassicEvent
162 *
163 * @brief This event set constant represents the bit in the event set
164 *   associated with event 6.
165 */
166#define RTEMS_EVENT_6 0x00000040
167
168/* Generated from spec:/rtems/event/if/event-07 */
169
170/**
171 * @ingroup RTEMSAPIClassicEvent
172 *
173 * @brief This event set constant represents the bit in the event set
174 *   associated with event 7.
175 */
176#define RTEMS_EVENT_7 0x00000080
177
178/* Generated from spec:/rtems/event/if/event-08 */
179
180/**
181 * @ingroup RTEMSAPIClassicEvent
182 *
183 * @brief This event set constant represents the bit in the event set
184 *   associated with event 8.
185 */
186#define RTEMS_EVENT_8 0x00000100
187
188/* Generated from spec:/rtems/event/if/event-09 */
189
190/**
191 * @ingroup RTEMSAPIClassicEvent
192 *
193 * @brief This event set constant represents the bit in the event set
194 *   associated with event 9.
195 */
196#define RTEMS_EVENT_9 0x00000200
197
198/* Generated from spec:/rtems/event/if/event-10 */
199
200/**
201 * @ingroup RTEMSAPIClassicEvent
202 *
203 * @brief This event set constant represents the bit in the event set
204 *   associated with event 10.
205 */
206#define RTEMS_EVENT_10 0x00000400
207
208/* Generated from spec:/rtems/event/if/event-11 */
209
210/**
211 * @ingroup RTEMSAPIClassicEvent
212 *
213 * @brief This event set constant represents the bit in the event set
214 *   associated with event 11.
215 */
216#define RTEMS_EVENT_11 0x00000800
217
218/* Generated from spec:/rtems/event/if/event-12 */
219
220/**
221 * @ingroup RTEMSAPIClassicEvent
222 *
223 * @brief This event set constant represents the bit in the event set
224 *   associated with event 12.
225 */
226#define RTEMS_EVENT_12 0x00001000
227
228/* Generated from spec:/rtems/event/if/event-13 */
229
230/**
231 * @ingroup RTEMSAPIClassicEvent
232 *
233 * @brief This event set constant represents the bit in the event set
234 *   associated with event 13.
235 */
236#define RTEMS_EVENT_13 0x00002000
237
238/* Generated from spec:/rtems/event/if/event-14 */
239
240/**
241 * @ingroup RTEMSAPIClassicEvent
242 *
243 * @brief This event set constant represents the bit in the event set
244 *   associated with event 14.
245 */
246#define RTEMS_EVENT_14 0x00004000
247
248/* Generated from spec:/rtems/event/if/event-15 */
249
250/**
251 * @ingroup RTEMSAPIClassicEvent
252 *
253 * @brief This event set constant represents the bit in the event set
254 *   associated with event 15.
255 */
256#define RTEMS_EVENT_15 0x00008000
257
258/* Generated from spec:/rtems/event/if/event-16 */
259
260/**
261 * @ingroup RTEMSAPIClassicEvent
262 *
263 * @brief This event set constant represents the bit in the event set
264 *   associated with event 16.
265 */
266#define RTEMS_EVENT_16 0x00010000
267
268/* Generated from spec:/rtems/event/if/event-17 */
269
270/**
271 * @ingroup RTEMSAPIClassicEvent
272 *
273 * @brief This event set constant represents the bit in the event set
274 *   associated with event 17.
275 */
276#define RTEMS_EVENT_17 0x00020000
277
278/* Generated from spec:/rtems/event/if/event-18 */
279
280/**
281 * @ingroup RTEMSAPIClassicEvent
282 *
283 * @brief This event set constant represents the bit in the event set
284 *   associated with event 18.
285 */
286#define RTEMS_EVENT_18 0x00040000
287
288/* Generated from spec:/rtems/event/if/event-19 */
289
290/**
291 * @ingroup RTEMSAPIClassicEvent
292 *
293 * @brief This event set constant represents the bit in the event set
294 *   associated with event 19.
295 */
296#define RTEMS_EVENT_19 0x00080000
297
298/* Generated from spec:/rtems/event/if/event-20 */
299
300/**
301 * @ingroup RTEMSAPIClassicEvent
302 *
303 * @brief This event set constant represents the bit in the event set
304 *   associated with event 20.
305 */
306#define RTEMS_EVENT_20 0x00100000
307
308/* Generated from spec:/rtems/event/if/event-21 */
309
310/**
311 * @ingroup RTEMSAPIClassicEvent
312 *
313 * @brief This event set constant represents the bit in the event set
314 *   associated with event 21.
315 */
316#define RTEMS_EVENT_21 0x00200000
317
318/* Generated from spec:/rtems/event/if/event-22 */
319
320/**
321 * @ingroup RTEMSAPIClassicEvent
322 *
323 * @brief This event set constant represents the bit in the event set
324 *   associated with event 22.
325 */
326#define RTEMS_EVENT_22 0x00400000
327
328/* Generated from spec:/rtems/event/if/event-23 */
329
330/**
331 * @ingroup RTEMSAPIClassicEvent
332 *
333 * @brief This event set constant represents the bit in the event set
334 *   associated with event 23.
335 */
336#define RTEMS_EVENT_23 0x00800000
337
338/* Generated from spec:/rtems/event/if/event-24 */
339
340/**
341 * @ingroup RTEMSAPIClassicEvent
342 *
343 * @brief This event set constant represents the bit in the event set
344 *   associated with event 24.
345 */
346#define RTEMS_EVENT_24 0x01000000
347
348/* Generated from spec:/rtems/event/if/event-25 */
349
350/**
351 * @ingroup RTEMSAPIClassicEvent
352 *
353 * @brief This event set constant represents the bit in the event set
354 *   associated with event 25.
355 */
356#define RTEMS_EVENT_25 0x02000000
357
358/* Generated from spec:/rtems/event/if/event-26 */
359
360/**
361 * @ingroup RTEMSAPIClassicEvent
362 *
363 * @brief This event set constant represents the bit in the event set
364 *   associated with event 26.
365 */
366#define RTEMS_EVENT_26 0x04000000
367
368/* Generated from spec:/rtems/event/if/event-27 */
369
370/**
371 * @ingroup RTEMSAPIClassicEvent
372 *
373 * @brief This event set constant represents the bit in the event set
374 *   associated with event 27.
375 */
376#define RTEMS_EVENT_27 0x08000000
377
378/* Generated from spec:/rtems/event/if/event-28 */
379
380/**
381 * @ingroup RTEMSAPIClassicEvent
382 *
383 * @brief This event set constant represents the bit in the event set
384 *   associated with event 28.
385 */
386#define RTEMS_EVENT_28 0x10000000
387
388/* Generated from spec:/rtems/event/if/event-29 */
389
390/**
391 * @ingroup RTEMSAPIClassicEvent
392 *
393 * @brief This event set constant represents the bit in the event set
394 *   associated with event 29.
395 */
396#define RTEMS_EVENT_29 0x20000000
397
398/* Generated from spec:/rtems/event/if/event-30 */
399
400/**
401 * @ingroup RTEMSAPIClassicEvent
402 *
403 * @brief This event set constant represents the bit in the event set
404 *   associated with event 30.
405 */
406#define RTEMS_EVENT_30 0x40000000
407
408/* Generated from spec:/rtems/event/if/event-31 */
409
410/**
411 * @ingroup RTEMSAPIClassicEvent
412 *
413 * @brief This event set constant represents the bit in the event set
414 *   associated with event 31.
415 */
416#define RTEMS_EVENT_31 0x80000000
417
418/* Generated from spec:/rtems/event/if/pending-events */
419
420/**
421 * @ingroup RTEMSAPIClassicEvent
422 *
423 * @brief This event set constant indicates that rtems_event_receive() shall
424 *   return the set of pending events.
425 */
426#define RTEMS_PENDING_EVENTS 0
427
428/* Generated from spec:/rtems/event/if/set */
429
430/**
431 * @ingroup RTEMSAPIClassicEvent
432 *
433 * @brief This integer type represents a bit field which can hold exactly 32
434 *   individual events.
435 */
436typedef uint32_t rtems_event_set;
437
438/* Generated from spec:/rtems/event/if/system-network-close */
439
440/**
441 * @brief This event set constant represents the reserved system event for a
442 *   network socket close.
443 */
444#define RTEMS_EVENT_SYSTEM_NETWORK_CLOSE RTEMS_EVENT_26
445
446/* Generated from spec:/rtems/event/if/system-network-sbwait */
447
448/**
449 * @brief This event set constant represents the reserved system event for a
450 *   network socket buffer wait usage.
451 */
452#define RTEMS_EVENT_SYSTEM_NETWORK_SBWAIT RTEMS_EVENT_24
453
454/* Generated from spec:/rtems/event/if/system-network-sosleep */
455
456/**
457 * @brief This event set constant represents the reserved system event for a
458 *   network socket sleep.
459 */
460#define RTEMS_EVENT_SYSTEM_NETWORK_SOSLEEP RTEMS_EVENT_25
461
462/* Generated from spec:/rtems/event/if/system-receive */
463
464/**
465 * @brief Receives or gets a system event set from the executing task.
466 *
467 * @param event_in is the event set of interest.  Use #RTEMS_PENDING_EVENTS to
468 *   get the pending events.
469 *
470 * @param option_set is the option set.
471 *
472 * @param ticks is the timeout in clock ticks if the #RTEMS_WAIT option was
473 *   set.  Use #RTEMS_NO_TIMEOUT to wait potentially forever.
474 *
475 * @param event_out is the pointer to an event set.  The received or pending
476 *   events are stored in the referenced event set if the operation was
477 *   successful.
478 *
479 * This directive performs the same actions as the rtems_event_receive()
480 * directive except that it operates with a different set of events for each
481 * task.
482 */
483rtems_status_code rtems_event_system_receive(
484  rtems_event_set  event_in,
485  rtems_option     option_set,
486  rtems_interval   ticks,
487  rtems_event_set *event_out
488);
489
490/* Generated from spec:/rtems/event/if/system-send */
491
492/**
493 * @brief Sends the system event set to the task.
494 *
495 * @param id is the identifier of the target task to receive the event set.
496 *
497 * @param event_in is the event set to send.
498 */
499rtems_status_code rtems_event_system_send(
500  rtems_id        id,
501  rtems_event_set event_in
502);
503
504/* Generated from spec:/rtems/event/if/system-server */
505
506/**
507 * @brief This event set constant represents the reserved system event for
508 *   server thread usage, for example the timer or interrupt server.
509 */
510#define RTEMS_EVENT_SYSTEM_SERVER RTEMS_EVENT_30
511
512/* Generated from spec:/rtems/event/if/system-server-resume */
513
514/**
515 * @brief This event set constant represents the reserved system event to
516 *   resume a server thread, for example the timer or interrupt server.
517 */
518#define RTEMS_EVENT_SYSTEM_SERVER_RESUME RTEMS_EVENT_29
519
520/* Generated from spec:/rtems/event/if/system-transient */
521
522/**
523 * @brief This event set constant represents the reserved system event for
524 *   transient usage.
525 */
526#define RTEMS_EVENT_SYSTEM_TRANSIENT RTEMS_EVENT_31
527
528/* Generated from spec:/rtems/event/if/transient-clear */
529
530/**
531 * @brief Clears the transient event.
532 */
533static inline void rtems_event_transient_clear( void )
534{
535  rtems_event_set event_out;
536
537  (void) rtems_event_system_receive(
538    RTEMS_EVENT_SYSTEM_TRANSIENT,
539    RTEMS_EVENT_ALL | RTEMS_NO_WAIT,
540    0,
541    &event_out
542  );
543}
544
545/* Generated from spec:/rtems/event/if/transient-receive */
546
547/**
548 * @brief Receives the transient event.
549 *
550 * @param option_set is the option set.
551 *
552 * @param ticks is the optional timeout in clock ticks.
553 */
554static inline rtems_status_code rtems_event_transient_receive(
555  rtems_option   option_set,
556  rtems_interval ticks
557)
558{
559  rtems_event_set event_out;
560
561  return rtems_event_system_receive(
562    RTEMS_EVENT_SYSTEM_TRANSIENT,
563    RTEMS_EVENT_ALL | option_set,
564    ticks,
565    &event_out
566  );
567}
568
569/* Generated from spec:/rtems/event/if/transient-send */
570
571/**
572 * @brief Sends the transient event to the task.
573 *
574 * @param id is the identifier of the task to receive the transient event.
575 */
576static inline rtems_status_code rtems_event_transient_send( rtems_id id )
577{
578  return rtems_event_system_send( id, RTEMS_EVENT_SYSTEM_TRANSIENT );
579}
580
581/* Generated from spec:/rtems/event/if/send */
582
583/**
584 * @ingroup RTEMSAPIClassicEvent
585 *
586 * @brief Sends the event set to the task.
587 *
588 * @param id is the identifier of the target task to receive the event set.
589 *
590 * @param event_in is the event set to send.
591 *
592 * This directive sends the event set, ``event_in``, to the target task
593 * identified by ``id``.  Based upon the state of the target task, one of the
594 * following situations applies:
595 *
596 * * The target task is blocked waiting for events, then
597 *
598 *   * if the waiting task's input event condition is satisfied, then the task
599 *     is made ready for execution, or
600 *
601 *   * otherwise, the event set is posted but left pending and the task remains
602 *     blocked.
603 *
604 * * The target task is not waiting for events, then the event set is posted
605 *   and left pending.
606 *
607 * @retval ::RTEMS_SUCCESSFUL The requested operation was successful.
608 *
609 * @retval ::RTEMS_INVALID_ID There was no task associated with the identifier
610 *   specified by ``id``.
611 *
612 * @par Notes
613 * @parblock
614 * Events can be sent by tasks or an ISR.
615 *
616 * Specifying #RTEMS_SELF for ``id`` results in the event set being sent to the
617 * calling task.
618 *
619 * The event set to send shall be built by a *bitwise or* of the desired
620 * events. The set of valid events is #RTEMS_EVENT_0 through #RTEMS_EVENT_31.
621 * If an event is not explicitly specified in the set, then it is not present.
622 *
623 * Identical events sent to a task are not queued.  In other words, the second,
624 * and subsequent, posting of an event to a task before it can perform an
625 * rtems_event_receive() has no effect.
626 *
627 * The calling task will be preempted if it has preemption enabled and a higher
628 * priority task is unblocked as the result of this directive.
629 *
630 * Sending an event set to a global task which does not reside on the local
631 * node will generate a request telling the remote node to send the event set
632 * to the appropriate task.
633 * @endparblock
634 */
635rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in );
636
637/* Generated from spec:/rtems/event/if/receive */
638
639/**
640 * @ingroup RTEMSAPIClassicEvent
641 *
642 * @brief Receives or gets an event set from the calling task.
643 *
644 * @param event_in is the event set of interest.  Use #RTEMS_PENDING_EVENTS to
645 *   get the pending events.
646 *
647 * @param option_set is the option set.
648 *
649 * @param ticks is the timeout in clock ticks if the #RTEMS_WAIT option is set.
650 *   Use #RTEMS_NO_TIMEOUT to wait potentially forever.
651 *
652 * @param event_out is the pointer to an event set.  The received or pending
653 *   events are stored in the referenced event set if the operation was
654 *   successful.
655 *
656 * This directive can be used to
657 *
658 * * get the pending events of the calling task, or
659 *
660 * * receive events.
661 *
662 * To **get the pending events** use the constant #RTEMS_PENDING_EVENTS for the
663 * ``event_in`` parameter.  The pending events are returned to the calling task
664 * but the event set of the task is left unaltered.  The ``option_set`` and
665 * ``ticks`` parameters are ignored in this case.  The directive returns
666 * immediately and does not block.
667 *
668 * To **receive events** you have to define an input event condition and some
669 * options.  The **option set** specified in ``option_set`` defines
670 *
671 * * if the task will wait or poll for the events, and
672 *
673 * * if the task wants to receive all or any of the input events.
674 *
675 * The option set is built through a *bitwise or* of the option constants
676 * described below.
677 *
678 * The task can **wait** or **poll** for the events.
679 *
680 * * **Waiting** for events is the default and can be emphasized through the
681 *   use of the #RTEMS_WAIT option.  The ``ticks`` parameter defines how long
682 *   the task is willing to wait.  Use #RTEMS_NO_TIMEOUT to wait potentially
683 *   forever, otherwise set a timeout interval in clock ticks.
684 *
685 * * Not waiting for events (**polling**) is selected by the #RTEMS_NO_WAIT
686 *   option.  If this option is defined, then the ``ticks`` parameter is
687 *   ignored.
688 *
689 * The task can receive **all** or **any** of the input events specified in
690 * ``event_in``.
691 *
692 * * Receiving **all** input events is the default and can be emphasized
693 *   through the use of the #RTEMS_EVENT_ALL option.
694 *
695 * * Receiving **any** of the input events is selected by the #RTEMS_EVENT_ANY
696 *   option.
697 *
698 * @retval ::RTEMS_SUCCESSFUL The requested operation was successful.
699 *
700 * @retval ::RTEMS_INVALID_ADDRESS The ``event_out`` parameter was NULL.
701 *
702 * @retval ::RTEMS_UNSATISFIED The events of interest were not immediately
703 *   available.
704 *
705 * @retval ::RTEMS_TIMEOUT The events of interest were not available within the
706 *   specified timeout interval.
707 *
708 * @par Notes
709 * @parblock
710 * This directive shall be called by a task.  Calling this directive from
711 * interrupt context is undefined behaviour.
712 *
713 * This directive only affects the events specified in ``event_in``. Any
714 * pending events that do not correspond to any of the events specified in
715 * ``event_in`` will be left pending.
716 *
717 * To receive all events use the event set constant #RTEMS_ALL_EVENTS for the
718 * ``event_in`` parameter.  Do not confuse this event set constant with the
719 * directive option #RTEMS_EVENT_ALL.
720 *
721 * A task can **receive all of the pending events** by calling the directive
722 * with a value of #RTEMS_ALL_EVENTS for the ``event_in`` parameter and the
723 * bitwise or of the #RTEMS_NO_WAIT and #RTEMS_EVENT_ANY options for the
724 * ``option_set`` parameter.  The pending events are returned and the event set
725 * of the task is cleared.  If no events are pending then the
726 * ::RTEMS_UNSATISFIED status code will be returned.
727 * @endparblock
728 */
729rtems_status_code rtems_event_receive(
730  rtems_event_set  event_in,
731  rtems_option     option_set,
732  rtems_interval   ticks,
733  rtems_event_set *event_out
734);
735
736#ifdef __cplusplus
737}
738#endif
739
740#endif /* _RTEMS_RTEMS_EVENT_H */
Note: See TracBrowser for help on using the repository browser.