diff options
| author | Ralf Jung <post@ralfj.de> | 2024-10-09 16:20:39 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-10-09 16:20:39 +0200 |
| commit | 7a9a9cba3f02445e2e1f3d34b31a588405cf68a9 (patch) | |
| tree | 59c4b8db8a12bae809d6c58086b14b8e60a73fc5 | |
| parent | 87058a499093b2d919849c6edeb643c5ba03a438 (diff) | |
| download | rust-7a9a9cba3f02445e2e1f3d34b31a588405cf68a9.tar.gz rust-7a9a9cba3f02445e2e1f3d34b31a588405cf68a9.zip | |
epoll: rename blocking_epoll_callback since it is not just called after unblocking
| -rw-r--r-- | src/tools/miri/src/shims/unix/linux/epoll.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/tools/miri/src/shims/unix/linux/epoll.rs b/src/tools/miri/src/shims/unix/linux/epoll.rs index 81a6739728b..b3c66c1b578 100644 --- a/src/tools/miri/src/shims/unix/linux/epoll.rs +++ b/src/tools/miri/src/shims/unix/linux/epoll.rs @@ -480,7 +480,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { } if timeout == 0 || !ready_list_empty { // If the ready list is not empty, or the timeout is 0, we can return immediately. - blocking_epoll_callback(epfd_value, weak_epfd, dest, &event, this)?; + return_ready_list(epfd_value, weak_epfd, dest, &event, this)?; } else { // Blocking let timeout = match timeout { @@ -508,7 +508,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { event: MPlaceTy<'tcx>, } @unblock = |this| { - blocking_epoll_callback(epfd_value, weak_epfd, &dest, &event, this)?; + return_ready_list(epfd_value, weak_epfd, &dest, &event, this)?; interp_ok(()) } @timeout = |this| { @@ -636,8 +636,9 @@ fn check_and_update_one_event_interest<'tcx>( } } -/// Callback function after epoll_wait unblocks -fn blocking_epoll_callback<'tcx>( +/// Stores the ready list of the `epfd` epoll instance into `events` (which must be an array), +/// and the number of returned events into `dest`. +fn return_ready_list<'tcx>( epfd_value: i32, weak_epfd: WeakFileDescriptionRef, dest: &MPlaceTy<'tcx>, |
