Beispiel #1
0
static void
poll_dealloc(struct event_base *base, void *arg)
{
	struct pollop *pop = arg;

	evsignal_dealloc(base);
	free(pop->event_set);
	free(pop->event_r_back);
	free(pop->event_w_back);
	free(pop->idxplus1_by_fd);

	memset(pop, 0, sizeof(struct pollop));
	free(pop);
}
Beispiel #2
0
static void
evport_dealloc (struct event_base *base, void *arg)
{

  struct evport_data *evpd = arg;

  evsignal_dealloc (base);

  close (evpd->ed_port);

  if (evpd->ed_fds)
    free (evpd->ed_fds);

  free (evpd);
}
Beispiel #3
0
static void
select_dealloc(struct event_base *base, void *arg)
{
	struct selectop *sop = arg;

	evsignal_dealloc(base);
	free(sop->event_readset_in);
	free(sop->event_writeset_in);
	free(sop->event_readset_out);
	free(sop->event_writeset_out);
	free(sop->event_r_by_fd);
	free(sop->event_w_by_fd);

	memset(sop, 0, sizeof(struct selectop));
	free(sop);
}
Beispiel #4
0
static void
epoll_dealloc(struct event_base *base, void *arg)
{
	struct epollop *epollop = arg;

	evsignal_dealloc(base);
	if (epollop->fds)
		free(epollop->fds);
	if (epollop->events)
		free(epollop->events);
	if (epollop->epfd >= 0)
		close(epollop->epfd);

	memset(epollop, 0, sizeof(struct epollop));
	free(epollop);
}
Beispiel #5
0
static void
devpoll_dealloc(struct event_base *base, void *arg)
{
	struct devpollop *devpollop = arg;

	evsignal_dealloc(base);
	if (devpollop->fds)
		free(devpollop->fds);
	if (devpollop->events)
		free(devpollop->events);
	if (devpollop->changes)
		free(devpollop->changes);
	if (devpollop->dpfd >= 0)
		close(devpollop->dpfd);

	memset(devpollop, 0, sizeof(struct devpollop));
	free(devpollop);
}