Esempio n. 1
0
static void
init_event_system (SocketIOData *data)
{
#ifdef HAVE_EPOLL
	if (data->event_system == EPOLL_BACKEND)
		data->event_data = tp_epoll_init (data);
#elif defined(HAVE_KQUEUE)
	if (data->event_system == KQUEUE_BACKEND)
		data->event_data = tp_kqueue_init (data);
#endif
	if (data->event_system == POLL_BACKEND)
		data->event_data = tp_poll_init (data);
}
Esempio n. 2
0
static void
init_event_system (SocketIOData *data)
{
#ifdef HAVE_EPOLL
	if (data->event_system == EPOLL_BACKEND) {
		data->event_data = tp_epoll_init (data);
		if (data->event_data == NULL) {
			if (g_getenv ("MONO_DEBUG"))
				g_message ("Falling back to poll()");
			data->event_system = POLL_BACKEND;
		}
	}
#elif defined(HAVE_KQUEUE)
	if (data->event_system == KQUEUE_BACKEND)
		data->event_data = tp_kqueue_init (data);
#endif
	if (data->event_system == POLL_BACKEND)
		data->event_data = tp_poll_init (data);
}