From 7bbf6fb6a716f052277a9b4da00b984471786aec Mon Sep 17 00:00:00 2001 From: tiif Date: Sat, 5 Oct 2024 18:05:39 +0800 Subject: [PATCH] Add and delete comments --- src/shims/unix/linux/eventfd.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/shims/unix/linux/eventfd.rs b/src/shims/unix/linux/eventfd.rs index 5df78ffc99..272f18d2d6 100644 --- a/src/shims/unix/linux/eventfd.rs +++ b/src/shims/unix/linux/eventfd.rs @@ -103,7 +103,6 @@ impl FileDescription for Event { ), ); } else { - // TODO: why the compiler suggested not to use &dest?? blocking_eventfd_read_callback(&buf_place, dest, weak_eventfd, ecx)?; } interp_ok(()) @@ -247,6 +246,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { } } +/// Callback function after eventfd read unblocks. fn blocking_eventfd_read_callback<'tcx>( buf_place: &MPlaceTy<'tcx>, dest: &MPlaceTy<'tcx>, @@ -281,6 +281,9 @@ fn blocking_eventfd_read_callback<'tcx>( // Tell userspace how many bytes we wrote. ecx.write_int(buf_place.layout.size.bytes(), dest) } + + +/// Callback function after eventfd write unblocks. fn blocking_eventfd_write_callback<'tcx>( num: u64, buf_place: &MPlaceTy<'tcx>,