Skip to content

Commit a517049

Browse files
committed
Auto merge of #115312 - hermitcore:hermit-is_interrupted, r=thomcc
fix(sys/hermit): add is_interrupted #115228 broke compilation for Hermit by not adding a Hermit implementation of is_interrupted.
2 parents f3284dc + eee2733 commit a517049

File tree

1 file changed

+5
-0
lines changed
  • library/std/src/sys/hermit

1 file changed

+5
-0
lines changed

library/std/src/sys/hermit/mod.rs

+5
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,11 @@ pub unsafe extern "C" fn runtime_entry(
129129
abi::exit(result);
130130
}
131131

132+
#[inline]
133+
pub(crate) fn is_interrupted(errno: i32) -> bool {
134+
errno == abi::errno::EINTR
135+
}
136+
132137
pub fn decode_error_kind(errno: i32) -> ErrorKind {
133138
match errno {
134139
abi::errno::EACCES => ErrorKind::PermissionDenied,

0 commit comments

Comments
 (0)