revised epoll_wait