Merge remote-tracking branch 'origin/epoll'

This commit is contained in:
Jeremy Soller
2019-04-28 10:28:27 -06:00
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -54,6 +54,7 @@ pub fn poll_epoll(fds: &mut [pollfd], timeout: c_int) -> c_int {
data: epoll_data {
u64: i as u64,
},
..Default::default()
};
for (p, ep) in event_map.iter() {
+3
View File
@@ -82,6 +82,7 @@ pub fn select_epoll(
data: epoll_data {
fd: fd,
},
..Default::default()
};
if epoll_ctl(*ep, EPOLL_CTL_ADD, fd, &mut event) < 0 {
if unsafe { platform::errno == errno::EPERM } {
@@ -101,6 +102,7 @@ pub fn select_epoll(
data: epoll_data {
fd: fd,
},
..Default::default()
};
if epoll_ctl(*ep, EPOLL_CTL_ADD, fd, &mut event) < 0 {
if unsafe { platform::errno == errno::EPERM } {
@@ -120,6 +122,7 @@ pub fn select_epoll(
data: epoll_data {
fd: fd,
},
..Default::default()
};
if epoll_ctl(*ep, EPOLL_CTL_ADD, fd, &mut event) < 0 {
if unsafe { platform::errno == errno::EPERM } {