}
static void
-poll_update_add (gint fd, gint events, gboolean is_new)
+poll_register_fd (gint fd, gint events, gboolean is_new)
{
gboolean found = FALSE;
gint j, k;
}
}
+ if (events == 0) {
+ if (found)
+ POLL_INIT_FD (poll_fds + j, -1, 0);
+ return;
+ }
+
if (!found) {
for (j = 1; j < poll_fds_capacity; ++j) {
mono_pollfd *poll_fd = poll_fds + j;
#else
case WSAEINTR:
#endif
- check_for_interruption_critical ();
+ mono_thread_internal_check_for_interruption_critical (mono_thread_internal_current ());
ready = 0;
break;
#if !defined(HOST_WIN32)
return poll_fds_size;
}
-static void
-poll_event_reset_fd_at (gint i, gint events)
-{
- g_assert (poll_fds [i].fd != -1);
- g_assert (poll_fds [i].revents != 0);
-
- POLL_INIT_FD (&poll_fds [i], events == 0 ? -1 : poll_fds [i].fd, events);
-}
-
static ThreadPoolIOBackend backend_poll = {
.init = poll_init,
.cleanup = poll_cleanup,
- .update_add = poll_update_add,
+ .register_fd = poll_register_fd,
.event_wait = poll_event_wait,
.event_get_fd_max = poll_event_get_fd_max,
.event_get_fd_at = poll_event_get_fd_at,
- .event_reset_fd_at = poll_event_reset_fd_at,
};