#define EPOLLRDHUP 0x2000
#endif
-int uloop_init(void)
+static int uloop_init_pollfd(void)
{
if (poll_fd >= 0)
return 0;
if (flags & ULOOP_EDGE_TRIGGER)
ev.events |= EPOLLET;
- ev.data.fd = fd->fd;
ev.data.ptr = fd;
- fd->flags = flags;
return epoll_ctl(poll_fd, op, fd->fd, &ev);
}