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
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue