Skip to content

Commit

Permalink
Add and delete comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tiif committed Oct 5, 2024
1 parent df47e0a commit 7bbf6fb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/shims/unix/linux/eventfd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
Expand Down Expand Up @@ -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>,
Expand Down Expand Up @@ -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>,
Expand Down

0 comments on commit 7bbf6fb

Please sign in to comment.