Enum kernel::process::State[][src]

pub enum State {
    Running,
    Yielded,
    StoppedRunning,
    StoppedYielded,
    Faulted,
    Terminated,
    Unstarted,
}
Expand description

Various states a process can be in.

This is made public in case external implementations of Process want to re-use these process states in the external implementation.

Variants

Running

Process expects to be running code. The process may not be currently scheduled by the scheduler, but the process has work to do if it is scheduled.

Yielded

Process stopped executing and returned to the kernel because it called the yield syscall. This likely means it is waiting for some event to occur, but it could also mean it has finished and doesn’t need to be scheduled again.

StoppedRunning

The process is stopped, and its previous state was Running. This is used if the kernel forcibly stops a process when it is in the Running state. This state indicates to the kernel not to schedule the process, but if the process is to be resumed later it should be put back in the running state so it will execute correctly.

StoppedYielded

The process is stopped, and it was stopped while it was yielded. If this process needs to be resumed it should be put back in the Yield state.

Faulted

The process faulted and cannot be run.

Terminated

The process exited with the exit-terminate system call and cannot be run.

Unstarted

The process has never actually been executed. This of course happens when the board first boots and the kernel has not switched to any processes yet. It can also happen if an process is terminated and all of its state is reset as if it has not been executed yet.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.