*
* Copyright 2001-2003 Ximian, Inc (http://www.ximian.com)
* Copyright 2004-2011 Novell, Inc (http://www.novell.com)
+ * Copyright 2011 Xamarin Inc (http://www.xamarin.com)
*/
struct _tp_epoll_data {
result->epollfd = epoll_create (256); /* The number does not really matter */
fcntl (result->epollfd, F_SETFD, FD_CLOEXEC);
#endif
- if (result->epollfd == -1)
+ if (result->epollfd == -1) {
+ int err = errno;
+ if (g_getenv ("MONO_DEBUG")) {
+#ifdef EPOLL_CLOEXEC
+ g_message ("epoll_create1(EPOLL_CLOEXEC) failed: %d %s", err, g_strerror (err));
+#else
+ g_message ("epoll_create(256) failed: %d %s", err, g_strerror (err));
+#endif
+ }
+
return NULL;
+ }
data->shutdown = tp_epoll_shutdown;
data->modify = tp_epoll_modify;
}
LeaveCriticalSection (&socket_io_data->io_lock);
threadpool_append_jobs (&async_io_tp, (MonoObject **) async_results, nresults);
- memset (async_results, 0, sizeof (gpointer) * nresults);
+ mono_gc_bzero (async_results, sizeof (gpointer) * nresults);
}
}
#undef EPOLL_NEVENTS