37#define GP_POLLIN GP_POLLIN
38#define GP_POLLPRI GP_POLLPRI
39#define GP_POLLOUT GP_POLLOUT
40#define GP_POLLERR GP_POLLERR
41#define GP_POLLHUP GP_POLLHUP
A linked list implementation.
int gp_poll_wait(gp_poll *self, int timeout_ms)
A wrapper around the poll().
int gp_poll_add(gp_poll *self, gp_fd *fd)
Adds a file descriptor.
void gp_poll_clear(gp_poll *self)
Removes all file descriptors from the poll.
gp_poll_event_ret
A return value from the event() callback.
gp_poll_events
A gp_epoll flags.
gp_fd * gp_poll_rem_by_fd(gp_poll *self, int fd)
Looks up and removes a gp_fd by a fd.
static size_t gp_poll_fds(gp_poll *self)
Returns a number of fds in the poll instance.
int gp_poll_rem(gp_poll *self, gp_fd *fd)
Removes a file descriptor.
A double linked list header.
A double linked list pointers.
size_t cnt
A number of elements in the list.
An epoll file descriptor.
gp_dlist_head lhead
Linked list pointers.
uint32_t revents
Events returned from epoll.
uint32_t events
Epoll events to watch.
enum gp_poll_event_ret(* event)(gp_fd *self)
Epoll event handler.