#include "mainloop.h"
-struct lxc_handler {
+struct mainloop_handler {
lxc_mainloop_callback_t callback;
int fd;
void *data;
int lxc_mainloop(struct lxc_epoll_descr *descr)
{
int i, nfds, triggered;
- struct lxc_handler *handler;
+ struct mainloop_handler *handler;
for (;;) {
continue;
triggered++;
- handler = (struct lxc_handler *)descr->ev[i].data.ptr;
+ handler =
+ (struct mainloop_handler *) descr->ev[i].data.ptr;
/* If the handler returns a positive value, exit
the mainloop */
lxc_mainloop_callback_t callback, void *data)
{
struct epoll_event *ev;
- struct lxc_handler *handler;
+ struct mainloop_handler *handler;
int ret = -1;
handler = malloc(sizeof(*handler));
int lxc_mainloop_del_handler(struct lxc_epoll_descr *descr, int fd)
{
struct epoll_event *ev;
- struct lxc_handler *handler;
+ struct mainloop_handler *handler;
int i, j, idx = 0;
for (i = 0; i < descr->nfds; i++) {