Lely core libraries
2.2.5
|
Go to the documentation of this file.
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_
@ IO_EVENT_ERROR
An event signaling that an error has occurred for a file descriptor.
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.
unsigned char sig
The signal number (if events == IO_EVENT_SIGNAL).
union io_event::@13 u
Signal attributes depending on the value of events.
io_handle_t handle
An I/O device handle (if events != IO_EVENT_SIGNAL).
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 ...
int io_poll_signal(io_poll_t *poll, unsigned char sig)
Generates a signal event.
@ IO_EVENT_SIGNAL
An event representing the occurrence of a signal.
void * data
A pointer to user-specified data (if events != IO_EVENT_SIGNAL).
io_poll_t * io_poll_create(void)
Creates a new I/O polling interface.
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...