Skip to main content

Process

Struct Process 

Source
pub struct Process {
    pub pid: i32,
    pub parent_pid: i32,
    pub addr_space: AddressSpace,
    pub status: ProcessStatus,
    pub kernel_stack_top: VirtAddr,
    pub regs: SavedRegs,
}
Expand description

Represents all necessary data to manage processes

Fields§

§pid: i32§parent_pid: i32§addr_space: AddressSpace§status: ProcessStatus§kernel_stack_top: VirtAddr§regs: SavedRegs

Implementations§

Source§

impl Process

Source

pub fn new( pid: i32, parent_pid: i32, addr_space: AddressSpace, kernel_stack_top: VirtAddr, ) -> Self

Create a new process which owns an address space

Auto Trait Implementations§

§

impl Freeze for Process

§

impl RefUnwindSafe for Process

§

impl Send for Process

§

impl Sync for Process

§

impl Unpin for Process

§

impl UnsafeUnpin for Process

§

impl UnwindSafe for Process

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.