projects
/
c11tester.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add memmove and bzero
[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
}