diff options
| author | Frank Rehwinkel <frankrehwinkel@gmail.com> | 2024-10-02 08:13:11 -0400 |
|---|---|---|
| committer | Oli Scherer <github@oli-obk.de> | 2024-10-02 20:08:46 +0200 |
| commit | 81202c8b13c6ff64c14fd740757ba3e283adfec7 (patch) | |
| tree | 4c94efc409d8ffedeee33e53e16c41051914f359 | |
| parent | 86bb1373aa94aec8d9d4c8fb692cd352eca01d90 (diff) | |
| download | rust-81202c8b13c6ff64c14fd740757ba3e283adfec7.tar.gz rust-81202c8b13c6ff64c14fd740757ba3e283adfec7.zip | |
epoll: remove extraneous clone of ready_list
A simplification that doesn't impact the epoll implementation's logic. It is not necessary to clone the ready_list before reading its `is_empty` state. This avoids the clone step but more importantly avoids the invisible drop step of the clone.
| -rw-r--r-- | src/tools/miri/src/shims/unix/linux/epoll.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/tools/miri/src/shims/unix/linux/epoll.rs b/src/tools/miri/src/shims/unix/linux/epoll.rs index 88fab8aa010..c4bd38c47e5 100644 --- a/src/tools/miri/src/shims/unix/linux/epoll.rs +++ b/src/tools/miri/src/shims/unix/linux/epoll.rs @@ -475,8 +475,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let epoll_file_description = epfd .downcast::<Epoll>() .ok_or_else(|| err_unsup_format!("non-epoll FD passed to `epoll_wait`"))?; - let binding = epoll_file_description.get_ready_list(); - ready_list_empty = binding.mapping.borrow_mut().is_empty(); + ready_list_empty = epoll_file_description.ready_list.mapping.borrow().is_empty(); thread_ids = epoll_file_description.thread_id.borrow_mut(); } if timeout == 0 || !ready_list_empty { |
