Skip to content

Commit

Permalink
Auto merge of rust-lang#115312 - hermitcore:hermit-is_interrupted, r=…
Browse files Browse the repository at this point in the history
…thomcc

fix(sys/hermit): add is_interrupted

rust-lang#115228 broke compilation for Hermit by not adding a Hermit implementation of is_interrupted.
  • Loading branch information
bors committed Aug 29, 2023
2 parents f3284dc + eee2733 commit a517049
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions library/std/src/sys/hermit/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ pub unsafe extern "C" fn runtime_entry(
abi::exit(result);
}

#[inline]
pub(crate) fn is_interrupted(errno: i32) -> bool {
errno == abi::errno::EINTR
}

pub fn decode_error_kind(errno: i32) -> ErrorKind {
match errno {
abi::errno::EACCES => ErrorKind::PermissionDenied,
Expand Down

0 comments on commit a517049

Please sign in to comment.