Skip to content
Snippets Groups Projects
Commit 83af06e1 authored by Martin Kröning's avatar Martin Kröning :crab:
Browse files

Macros: Add try_sys

parent 88177aaa
No related branches found
No related tags found
No related merge requests found
......@@ -54,6 +54,18 @@ macro_rules! dbg {
};
}
macro_rules! try_sys {
($expr:expr $(,)?) => {
match $expr {
::core::result::Result::Ok(val) => val,
::core::result::Result::Err(err) => {
error!("{err}");
return -1;
}
}
};
}
/// Runs `f` on the kernel stack.
///
/// All arguments and return values have to fit into registers:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment