pub struct SysCallReturnValue {
pub value: [usize; 2],
}Fields§
§value: [usize; 2]Implementations§
Source§impl SysCallReturnValue
impl SysCallReturnValue
Sourcepub unsafe fn to_exit_status(self) -> Result<ExitStatus>
pub unsafe fn to_exit_status(self) -> Result<ExitStatus>
Converts a SysCallReturnValue to a Result<ExitStatus>.
§Safety
The caller must guarantee that if the SysCallReturnValue does not represent
a system error (i.e., value[0] interpreted as signed is positive), then
value contains a valid bit pattern for ExitStatus (the tag in
value[0] corresponds to a valid variant of ExitStatus). If the value
does represent a system error, the caller guarantees that it is a valid
value of Error
These preconditions are satisfied the return values of the thread_terminate()
and process_terminate() system calls.
Trait Implementations§
Source§impl From<Result<(), Error>> for SysCallReturnValue
impl From<Result<(), Error>> for SysCallReturnValue
Source§impl From<Result<ExitStatus, Error>> for SysCallReturnValue
impl From<Result<ExitStatus, Error>> for SysCallReturnValue
Source§fn from(value: Result<ExitStatus>) -> Self
fn from(value: Result<ExitStatus>) -> Self
Converts to this type from the input type.
Source§impl From<Result<WaitReturn, Error>> for SysCallReturnValue
impl From<Result<WaitReturn, Error>> for SysCallReturnValue
Source§fn from(value: Result<WaitReturn>) -> Self
fn from(value: Result<WaitReturn>) -> Self
Converts to this type from the input type.
Source§impl From<Result<u64, Error>> for SysCallReturnValue
impl From<Result<u64, Error>> for SysCallReturnValue
Source§impl From<SysCallReturnValue> for Result<()>
impl From<SysCallReturnValue> for Result<()>
Source§fn from(ret_value: SysCallReturnValue) -> Result<()>
fn from(ret_value: SysCallReturnValue) -> Result<()>
Converts to this type from the input type.
Source§impl From<SysCallReturnValue> for Result<u32>
impl From<SysCallReturnValue> for Result<u32>
Source§fn from(ret_value: SysCallReturnValue) -> Result<u32>
fn from(ret_value: SysCallReturnValue) -> Result<u32>
Converts to this type from the input type.
Source§impl From<SysCallReturnValue> for u64
impl From<SysCallReturnValue> for u64
Source§fn from(ret_value: SysCallReturnValue) -> u64
fn from(ret_value: SysCallReturnValue) -> u64
Converts to this type from the input type.
Source§impl From<SysCallReturnValue> for Result<WaitReturn>
impl From<SysCallReturnValue> for Result<WaitReturn>
Source§fn from(ret: SysCallReturnValue) -> Result<WaitReturn>
fn from(ret: SysCallReturnValue) -> Result<WaitReturn>
Converts to this type from the input type.