pub struct SyscallResult {
pub name: &'static str,
pub outcome: TrapOutcome,
pub retval: Option<u64>,
pub error: bool,
}Expand description
Result of dispatching one syscall.
Fields§
§name: &'static strStable short name for traces.
outcome: TrapOutcomeWhether to exit the process or continue the guest.
retval: Option<u64>Value to write back into x0. None keeps x0 (e.g. exit).
error: boolWhen true, trap sets PSTATE.C and retval is a positive errno.
Implementations§
Source§impl SyscallResult
impl SyscallResult
Sourcepub const fn ok(name: &'static str, value: u64) -> Self
pub const fn ok(name: &'static str, value: u64) -> Self
Successful return: clear carry, x0 = value.
Sourcepub const fn err(name: &'static str, errno: i64) -> Self
pub const fn err(name: &'static str, errno: i64) -> Self
Error return: set carry, x0 = positive errno.
Sourcepub const fn thread_exit(name: &'static str) -> Self
pub const fn thread_exit(name: &'static str) -> Self
End the current guest thread only (bsdthread_terminate).
Trait Implementations§
Source§impl Clone for SyscallResult
impl Clone for SyscallResult
Auto Trait Implementations§
impl Freeze for SyscallResult
impl RefUnwindSafe for SyscallResult
impl Send for SyscallResult
impl Sync for SyscallResult
impl Unpin for SyscallResult
impl UnsafeUnpin for SyscallResult
impl UnwindSafe for SyscallResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more