Skip to content

Commit eee2733

Browse files
committed
fix(sys/hermit): add is_interrupted
Signed-off-by: Martin Kröning <[email protected]>
1 parent 7e02fd8 commit eee2733

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
@@ -130,6 +130,11 @@ pub unsafe extern "C" fn runtime_entry(
130130
abi::exit(result);
131131
}
132132

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

0 commit comments

Comments
 (0)