{
ply_list_node_t *node;
struct epoll_event event = { 0 };
- int status;
assert (loop != NULL);
assert (source != NULL);
if (source->is_getting_polled)
{
+ int status;
+
status = epoll_ctl (loop->epoll_fd, EPOLL_CTL_MOD, source->fd, &event);
+
+ if (status < 0)
+ ply_trace ("failed to modify epoll event mask for fd %d: %m", source->fd);
}
}
ply_list_node_t *source_node)
{
ply_event_source_t *source;
- int status;
source = (ply_event_source_t *) ply_list_node_get_data (source_node);
if (source->is_getting_polled)
{
+ int status;
+
status = epoll_ctl (loop->epoll_fd, EPOLL_CTL_DEL, source->fd, NULL);
+
+ if (status < 0)
+ ply_trace ("failed to delete fd %d from epoll watch list: %m", source->fd);
source->is_getting_polled = false;
}
while (node != NULL)
{
ply_list_node_t *next_node;
- ply_event_source_t *source;
- source = (ply_event_source_t *) ply_list_node_get_data (node);
next_node = ply_list_get_next_node (loop->sources, node);
ply_event_loop_remove_source_node (loop, node);
node = next_node;
ply_event_loop_free_timeout_watches (ply_event_loop_t *loop)
{
ply_list_node_t *node;
- double now;
assert (loop != NULL);
- now = ply_get_timestamp ();
node = ply_list_get_first_node (loop->timeout_watches);
while (node != NULL)
{