Skip to content

Commit a79012b

Browse files
committed
Auto merge of #3956 - RalfJung:epoll-ready-list, r=RalfJung
epoll: rename blocking_epoll_callback since it is not just called after unblocking `@tiif` does `return_ready_list` seem like a reasonable name?
2 parents 29f68ed + cba4815 commit a79012b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/shims/unix/linux/epoll.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
481481
}
482482
if timeout == 0 || !ready_list_empty {
483483
// If the ready list is not empty, or the timeout is 0, we can return immediately.
484-
blocking_epoll_callback(epfd_value, weak_epfd, dest, &event, this)?;
484+
return_ready_list(epfd_value, weak_epfd, dest, &event, this)?;
485485
} else {
486486
// Blocking
487487
let timeout = match timeout {
@@ -509,7 +509,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
509509
event: MPlaceTy<'tcx>,
510510
}
511511
@unblock = |this| {
512-
blocking_epoll_callback(epfd_value, weak_epfd, &dest, &event, this)?;
512+
return_ready_list(epfd_value, weak_epfd, &dest, &event, this)?;
513513
interp_ok(())
514514
}
515515
@timeout = |this| {
@@ -636,8 +636,9 @@ fn check_and_update_one_event_interest<'tcx>(
636636
}
637637
}
638638

639-
/// Callback function after epoll_wait unblocks
640-
fn blocking_epoll_callback<'tcx>(
639+
/// Stores the ready list of the `epfd` epoll instance into `events` (which must be an array),
640+
/// and the number of returned events into `dest`.
641+
fn return_ready_list<'tcx>(
641642
epfd_value: i32,
642643
weak_epfd: WeakFileDescriptionRef,
643644
dest: &MPlaceTy<'tcx>,

0 commit comments

Comments
 (0)