Try to catch data races for memcpy
[c11tester.git] / epoll.cc
1 #include "threads-model.h"
2 #include <sys/epoll.h>
3 #include <unistd.h>
4
5 int epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout) {
6         while(timeout != 0) {
7                 int res = real_epoll_wait(epfd, events, maxevents, 0);
8                 if (res != 0)
9                         return res;
10                 usleep(1);
11                 if (timeout > 0)
12                         timeout--;
13         }
14         return 0;
15 }