예제 #1
0
파일: eloop.c 프로젝트: jolin90/smartconfig
static void eloop_sock_table_dispatch(struct eloop_sock_table *readers,
									  struct eloop_sock_table *writers,
									  struct eloop_sock_table *exceptions,
									  struct pollfd **pollfds_map, int max_pollfd_map)
{
	if (eloop_sock_table_dispatch_table(readers, pollfds_map, max_pollfd_map, POLLIN | POLLERR | POLLHUP))
		return;

	if (eloop_sock_table_dispatch_table(writers, pollfds_map, max_pollfd_map, POLLOUT))
		return;

	eloop_sock_table_dispatch_table(exceptions, pollfds_map, max_pollfd_map, POLLERR | POLLHUP);
}
예제 #2
0
static void eloop_sock_table_dispatch(struct eloop_sock_table *readers,
				      struct eloop_sock_table *writers,
				      struct eloop_sock_table *exceptions,
				      struct pollfd **pollfds_map,
				      int max_pollfd_map)
{
	if (eloop_sock_table_dispatch_table(readers, pollfds_map,
					    max_pollfd_map, POLLIN))
		return; /* pollfds may be invalid at this point */

	if (eloop_sock_table_dispatch_table(writers, pollfds_map,
					    max_pollfd_map, POLLOUT))
		return; /* pollfds may be invalid at this point */

	eloop_sock_table_dispatch_table(exceptions, pollfds_map,
					max_pollfd_map, POLLERR | POLLHUP);
}