PxAwaitEvents()
Await specified events.
- APPLIES TO
-
1.0.0
- SYNOPSIS
-
PxEvents_t PxAwaitEvents (PxEvents_t events);
- ARGUMENTS
|
- RETURN VALUES
-
-
Events that caused the return
-
- DESCRIPTION
-
PxAwaitEvents waits until one or more of the events specified in events are signalled. It returns the events that caused the return. If an event from events was already signalled, the call returns immediately. If the events overlap with a previous mask of a PxExpectAbort the behavior of the call depends on the right PXACCESS_OVERRIDE_ABORT_EVENT. If the task has the right, all events are handled by PxAwaitEvents. Otherwise the events to PxExpectAbort have a higher priority and are captured by PxExpectAbort. The events are not counted, if an event is sent multiple times it is only received once. If events is zero then the task waits forever.
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
The parameter
events
contains a bitmask of events awaited and should not be zero, as this will forcePxAwaitEvents
to wait forever (V). Typically the event mask is a constant (V).
-
- After call
-
-
All events returned should be evaluated.
-
- Best Practice
-
-
No restrictions.
-
- SEE ALSO
- USAGE
-
#include "pxdef.h" #define MY_EVENT 0x1l PxEvents_t Ev = PxAwaitEvents(MY_EVENT); if (!(Ev & EVENT_SUCCESS)) { // Report error }