Skip to main content Skip to main content
Pigweed's logo Pigweed
code_xml
  1. Home
  2. Reference
  3. Rust
  4. pw_kernel
  5. syscall_defs
  6. SysCallReturnValue

SysCallReturnValue

Struct SysCallReturnValue 

Source
pub struct SysCallReturnValue {
    pub value: [usize; 2],
}

Fields§

§value: [usize; 2]

Implementations§

Source§

impl SysCallReturnValue

Source

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

Source§

fn from(value: Result<()>) -> Self

Converts to this type from the input type.
Source§

impl From<Result<ExitStatus, Error>> for SysCallReturnValue

Source§

fn from(value: Result<ExitStatus>) -> Self

Converts to this type from the input type.
Source§

impl From<Result<WaitReturn, Error>> for SysCallReturnValue

Source§

fn from(value: Result<WaitReturn>) -> Self

Converts to this type from the input type.
Source§

impl From<Result<u64, Error>> for SysCallReturnValue

Source§

fn from(value: Result<u64>) -> Self

Converts to this type from the input type.
Source§

impl From<SysCallReturnValue> for Result<()>

Source§

fn from(ret_value: SysCallReturnValue) -> Result<()>

Converts to this type from the input type.
Source§

impl From<SysCallReturnValue> for Result<u32>

Source§

fn from(ret_value: SysCallReturnValue) -> Result<u32>

Converts to this type from the input type.
Source§

impl From<SysCallReturnValue> for u64

Source§

fn from(ret_value: SysCallReturnValue) -> u64

Converts to this type from the input type.
Source§

impl From<SysCallReturnValue> for Result<WaitReturn>

Source§

fn from(ret: SysCallReturnValue) -> Result<WaitReturn>

Converts to this type from the input type.
Source§

impl From<i64> for SysCallReturnValue

Source§

fn from(value: i64) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for SysCallReturnValue

Source§

fn from(value: u64) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Forget for SysCallReturnValue

§

impl Freeze for SysCallReturnValue

§

impl Move for SysCallReturnValue

§

impl RefUnwindSafe for SysCallReturnValue

§

impl Send for SysCallReturnValue

§

impl Sync for SysCallReturnValue

§

impl Unpin for SysCallReturnValue

§

impl UnsafeUnpin for SysCallReturnValue

§

impl UnwindSafe for SysCallReturnValue

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = !

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.