Ejemplo n.º 1
0
static void
select_dealloc(struct event_base *base)
{
	evsig_dealloc(base);

	select_free_selectop(base->evbase);
}
Ejemplo n.º 2
0
static void
kq_dealloc(struct event_base *base)
{
	struct kqop *kqop = base->evbase;
	evsig_dealloc(base);
	kqop_free(kqop);
}
Ejemplo n.º 3
0
static void
evport_dealloc(struct event_base *base)
{
	struct evport_data *evpd = base->evbase;

	evsig_dealloc(base);

	close(evpd->ed_port);

	if (evpd->ed_fds)
		mm_free(evpd->ed_fds);
	mm_free(evpd);
}
Ejemplo n.º 4
0
Archivo: epoll.c Proyecto: drvid/iSoul
static void
epoll_dealloc(struct event_base *base)
{
	struct epollop *epollop = base->evbase;

	evsig_dealloc(base);
	if (epollop->events)
		mm_free(epollop->events);
	if (epollop->epfd >= 0)
		close(epollop->epfd);

	memset(epollop, 0, sizeof(struct epollop));
	mm_free(epollop);
}
Ejemplo n.º 5
0
Archivo: poll.c Proyecto: 00datman/ompi
static void
poll_dealloc(struct event_base *base)
{
	struct pollop *pop = base->evbase;

	evsig_dealloc(base);
	if (pop->event_set)
		mm_free(pop->event_set);
	if (pop->event_set_copy)
		mm_free(pop->event_set_copy);

	memset(pop, 0, sizeof(struct pollop));
	mm_free(pop);
}
Ejemplo n.º 6
0
static void
devpoll_dealloc(struct event_base *base)
{
	struct devpollop *devpollop = base->evbase;

	evsig_dealloc(base);
	if (devpollop->events)
		mm_free(devpollop->events);
	if (devpollop->changes)
		mm_free(devpollop->changes);
	if (devpollop->dpfd >= 0)
		close(devpollop->dpfd);

	memset(devpollop, 0, sizeof(struct devpollop));
	mm_free(devpollop);
}
Ejemplo n.º 7
0
static void
select_dealloc(struct event_base *base)
{
	struct selectop *sop = base->evbase;

	evsig_dealloc(base);
	if (sop->event_readset_in)
		mm_free(sop->event_readset_in);
	if (sop->event_writeset_in)
		mm_free(sop->event_writeset_in);
	if (sop->event_readset_out)
		mm_free(sop->event_readset_out);
	if (sop->event_writeset_out)
		mm_free(sop->event_writeset_out);

	memset(sop, 0, sizeof(struct selectop));
	mm_free(sop);
}
Ejemplo n.º 8
0
void
win32_dealloc(struct event_base *_base)
{
	struct win32op *win32op = _base->evbase;

	evsig_dealloc(_base);
	if (win32op->readset_in)
		mm_free(win32op->readset_in);
	if (win32op->writeset_in)
		mm_free(win32op->writeset_in);
	if (win32op->readset_out)
		mm_free(win32op->readset_out);
	if (win32op->writeset_out)
		mm_free(win32op->writeset_out);
	if (win32op->exset_out)
		mm_free(win32op->exset_out);
	/* XXXXX free the tree. */

	memset(win32op, 0, sizeof(win32op));
	mm_free(win32op);
}