Wait until an event is available.
#include <mm/renderer/events.h>
int mmr_event_wait( mmr_context_t *ctxt )
A context handle.
Wait for an event. This function usually blocks until an event occurs, at which point it unblocks and you can call mmr_event_get() to get the event details.
Occasionally, mmr_event_wait() may unblock or not block at all even though no events are available. For example, suppose a track enters the playlist range but then exits soon afterwards. The mm-renderer service creates metadata for the track when it comes in range and this activity generates an event. If the track exits the playlist range before the application calls mmr_event_get(), the track's metadata and the corresponding event are deleted. In the subsequent call to mmr_event_get(), the function will return the MMR_EVENT_NONE event.
Typically, you call mmr_event_wait() within an event-processing loop, right before you call mmr_event_get().
Zero on success, or -1 on failure (check errno).
QNX Neutrino
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No, except when using different context handles |