+
+void epoll_register(int fd, uint32_t events, void *ptr)
+{
+ struct epoll_event evt = { .events = events, .data.ptr = ptr };
+ if (epoll_ctl(epollfd, EPOLL_CTL_ADD, fd, &evt)) {
+ UNIXERR("epoll_ctl");
+ abort();
+ }
+}
+
+void epoll_modify(int fd, uint32_t events, void *ptr)
+{
+ struct epoll_event evt = { .events = events, .data.ptr = ptr };
+ if (epoll_ctl(epollfd, EPOLL_CTL_MOD, fd, &evt)) {
+ UNIXERR("epoll_ctl");
+ abort();
+ }
+}
+
+int epoll_select(struct epoll_event *events, int maxevents, int timeout)
+{
+ return epoll_wait(epollfd, events, maxevents, timeout);
+}