22#ifndef LELY_IO_POLL_H_
23#define LELY_IO_POLL_H_
72#define IO_EVENT_INIT \
87void *__io_poll_alloc(
void);
88void __io_poll_free(
void *ptr);
90void __io_poll_fini(
struct __io_poll *poll);
This is the public header file of the I/O library.
void io_poll_destroy(io_poll_t *poll)
Destroys an I/O polling interface.
@ IO_EVENT_READ
An event signaling that a file descriptor is ready for reading normal-priority (non-OOB) data.
@ IO_EVENT_WRITE
An event signaling that a file descriptor is ready for writing normal-priority (non-OOB) data.
@ IO_EVENT_SIGNAL
An event representing the occurrence of a signal.
@ IO_EVENT_ERROR
An event signaling that an error has occurred for a file descriptor.
io_poll_t * io_poll_create(void)
Creates a new I/O polling interface.
int io_poll_signal(io_poll_t *poll, unsigned char sig)
Generates a signal event.
int io_poll_wait(io_poll_t *poll, int maxevents, struct io_event *events, int timeout)
Waits at most timeout milliseconds for at most maxevents I/O events to occur for any of the I/O devic...
An I/O polling interface.
io_handle_t handle
An I/O device handle (if events != IO_EVENT_SIGNAL).
unsigned char sig
The signal number (if events == IO_EVENT_SIGNAL).
void * data
A pointer to user-specified data (if events != IO_EVENT_SIGNAL).
int events
The events that should be watched or have been triggered (either IO_EVENT_SIGNAL, or any combination ...
union io_event::@13 u
Signal attributes depending on the value of events.
An object representing a file descriptor being monitored for I/O events.