fix(sys/hermit): add is_interrupted
Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
This commit is contained in:
parent
7e02fd8251
commit
eee27331ba
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user