[corlib] RemotingConfiguration now try to use the bundled machine.config first.
[mono.git] / mono / metadata / threadpool-ms-io-poll.c
index 4adae56791b40af7ffab900966b10c267a908000..68e6611fba2619ee83cb65ea78cf16c249549c37 100644 (file)
@@ -28,12 +28,6 @@ poll_init (gint wakeup_pipe_fd)
        return TRUE;
 }
 
-static void
-poll_cleanup (void)
-{
-       g_free (poll_fds);
-}
-
 static void
 poll_register_fd (gint fd, gint events, gboolean is_new)
 {
@@ -149,7 +143,9 @@ poll_event_wait (void (*callback) (gint fd, gint events, gpointer user_data), gp
 
        mono_gc_set_skip_thread (TRUE);
 
+       MONO_ENTER_GC_SAFE;
        ready = mono_poll (poll_fds, poll_fds_size, -1);
+       MONO_EXIT_GC_SAFE;
 
        mono_gc_set_skip_thread (FALSE);
 
@@ -236,7 +232,6 @@ poll_event_wait (void (*callback) (gint fd, gint events, gpointer user_data), gp
 
 static ThreadPoolIOBackend backend_poll = {
        .init = poll_init,
-       .cleanup = poll_cleanup,
        .register_fd = poll_register_fd,
        .remove_fd = poll_remove_fd,
        .event_wait = poll_event_wait,