Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
coolyjg committed Jun 14, 2023
1 parent 2dc6501 commit 3f22323
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ulib/libax/src/cbindings/io_mpx/epoll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl EpollInstance {
}

pub fn control(&self, op: usize, fd: usize, event: &ctypes::epoll_event) -> LinuxResult<usize> {
match get_file_like(fd) {
match get_file_like(fd as c_int) {
Ok(_) => {}
Err(e) => return Err(e),
}
Expand All @@ -47,13 +47,13 @@ impl EpollInstance {
if let Entry::Occupied(_) = self.events.lock().entry(fd) {
return Err(LinuxError::EEXIST);
}
self.events.lock().insert(fd, event.clone());
self.events.lock().insert(fd, *event);
self.new_ctl_list.lock().insert(fd);
}
ctypes::EPOLL_CTL_MOD => {
let mut events = self.events.lock();
if let Entry::Occupied(mut ocp) = events.entry(fd) {
ocp.insert(event.clone());
ocp.insert(*event);
self.new_ctl_list.lock().insert(fd);
} else {
return Err(LinuxError::ENOENT);
Expand Down Expand Up @@ -213,13 +213,13 @@ pub unsafe extern "C" fn ax_epoll_wait(
let epollevent = epoll_instance.events.lock().get_mut(infd).cloned().unwrap();
if status.readable && ((epollevent.events & ctypes::EPOLLIN) != 0) {
(*events.add(events_num)).events = ctypes::EPOLLIN;
(*events.add(events_num)).data.u64_ = epollevent.data.ptr;
(*events.add(events_num)).data.u64_ = epollevent.data.u64_;
events_num += 1;
}

if status.writable && ((epollevent.events & ctypes::EPOLLOUT) != 0) {
(*events.add(events_num)).events = ctypes::EPOLLOUT;
(*events.add(events_num)).data.u64_ = epollevent.data.ptr;
(*events.add(events_num)).data.u64_ = epollevent.data.u64_;
events_num += 1;
}
}
Expand Down

0 comments on commit 3f22323

Please sign in to comment.