Skip to content

Commit c430b2d

Browse files
committed
add FIXME comments
1 parent 129cc01 commit c430b2d

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/shims/unix/linux/fd.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
150150
if let Some(epfd) = this.machine.file_handler.handles.get_mut(&epfd) {
151151
let _epfd = epfd.as_epoll_handle()?;
152152

153+
// FIXME return number of events ready when scheme for marking events ready exists
153154
Ok(Scalar::from_i32(numevents))
154155
} else {
155156
Ok(Scalar::from_i32(this.handle_not_found()?))

src/shims/unix/linux/fd/event.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ impl FileDescriptor for Event {
5959
bytes: &[u8],
6060
) -> InterpResult<'tcx, io::Result<usize>> {
6161
let v1 = self.val.get();
62+
// FIXME handle blocking when addition results in exceeding the max u64 value
63+
// or fail with EAGAIN if the file descriptor is nonblocking.
6264
let v2 = v1.checked_add(u64::from_be_bytes(bytes.try_into().unwrap())).unwrap();
6365
self.val.set(v2);
6466
assert_eq!(8, bytes.len());

0 commit comments

Comments
 (0)