Skip to content

Commit

Permalink
fix error code to be POSIX compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
stlankes committed Sep 29, 2024
1 parent 58cb8b0 commit 5238138
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scheduler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ impl PerCoreScheduler {
let mut pinned_obj = core::pin::pin!(borrowed.object_map.read());

let guard = ready!(pinned_obj.as_mut().poll(cx));
Ready(guard.get(&fd).cloned().ok_or(io::Error::EINVAL))
Ready(guard.get(&fd).cloned().ok_or(io::Error::EBADF))
})
})
.await
Expand Down Expand Up @@ -579,7 +579,7 @@ impl PerCoreScheduler {
let borrowed = self.current_task.borrow();
let mut pinned_obj = core::pin::pin!(borrowed.object_map.write());
let mut guard = ready!(pinned_obj.as_mut().poll(cx));
Ready(guard.remove(&fd).ok_or(io::Error::EINVAL))
Ready(guard.remove(&fd).ok_or(io::Error::EBADF))
})
})
.await
Expand Down

0 comments on commit 5238138

Please sign in to comment.