Skip to content

Commit 5564aac

Browse files
committed
Add is_interrupted
1 parent 93d7a5f commit 5564aac

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

library/std/src/os/custom/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ pub mod os {
219219
fn get_pid(&self) -> u32;
220220

221221
fn decode_error_kind(&self, errno: i32) -> crate::io::ErrorKind;
222+
fn is_interrupted(&self, errno: i32) -> bool;
222223
fn hashmap_random_keys(&self) -> (u64, u64);
223224
}
224225
}

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

+5
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ pub fn decode_error_kind(errno: i32) -> std_io::ErrorKind {
5050
custom_os_impl!(os, decode_error_kind, errno)
5151
}
5252

53+
#[inline]
54+
pub(crate) fn is_interrupted(errno: i32) -> bool {
55+
custom_os_impl!(os, is_interrupted, errno)
56+
}
57+
5358
pub fn abort_internal() -> ! {
5459
fn infinite_loop() -> ! {
5560
loop {}

0 commit comments

Comments
 (0)