22 #ifndef LELY_IO_POLL_H_ 23 #define LELY_IO_POLL_H_ 72 #define IO_EVENT_INIT \ 87 void *__io_poll_alloc(
void);
88 void __io_poll_free(
void *ptr);
90 void __io_poll_fini(
struct __io_poll *poll);
162 #endif // !LELY_IO_POLL_H_ unsigned char sig
The signal number (if events == IO_EVENT_SIGNAL).
This is the public header file of the I/O library.
An I/O polling interface.
An event signaling that a file descriptor is ready for reading normal-priority (non-OOB) data...
io_handle_t handle
An I/O device handle (if events != IO_EVENT_SIGNAL).
An event representing the occurrence of a signal.
An event signaling that a file descriptor is ready for writing normal-priority (non-OOB) data...
void io_poll_destroy(io_poll_t *poll)
Destroys an I/O polling interface.
int io_poll_watch(io_poll_t *poll, io_handle_t handle, struct io_event *event, int keep)
Registers an I/O device with an I/O polling interface and instructs it to watch for certain events...
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.
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.
void * data
A pointer to user-specified data (if events != IO_EVENT_SIGNAL).
An event signaling that an error has occurred for a file descriptor.
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...