tizevent

group tizevent

Global event loop, async io and timers.

Typedefs

typedef struct tiz_event_io tiz_event_io_t

Handle to an io event

typedef struct tiz_event_timer tiz_event_timer_t

Handle to a timer event

typedef struct tiz_event_stat tiz_event_stat_t

Handle to a file status change event

typedef void(* tiz_event_io_cb_f)(void *ap_arg0, tiz_event_io_t *ap_ev_io, void *ap_arg1, const uint32_t a_id, int a_fd, int a_events)

Callback prototype for io events

Parameters
  • p_ev_io: The io event being notified
  • fd: The associated file descriptor
  • events: The event types notified

Functions

OMX_ERRORTYPE tiz_event_loop_init(void)

Explicit initialisation of the global event loop. The loop is hosted in its own thread which is spawned the first time this function or any other function in this module are called. Therefore it is not mandatory to call this function in order to instantiate the global event loop. This is only useful if for some reason the initialization cannot be done at the same time as the first use.

Return
OMX_ErrorNone if success, OMX_ErrorInsufficientResources otherwise.

void tiz_event_loop_destroy(void)

Explicit destruction of the global event loop. WARNING: After this function, the event loop cannot be recreated in the current process. Therefore, if this function is used, the caller should guarantee that the global event loop is no longer needed.