about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/sys/hermit/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/library/std/src/sys/hermit/mod.rs b/library/std/src/sys/hermit/mod.rs
index c7cb8466705..692de1bbff8 100644
--- a/library/std/src/sys/hermit/mod.rs
+++ b/library/std/src/sys/hermit/mod.rs
@@ -130,6 +130,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,