Struct slos_hal::null_system::NullSystem[][src]

pub struct NullSystem {
    pub has_requested_return: bool,
    pub is_virtualized: bool,
}
Expand description

A SystemHardware implementation where (almost) everything has no-op implementations

Behaviour

The following general rules apply:

Methods on HAL traits that return &'static mut T references to other HAL trait objects return references to valid things, but those things are also all no-op implementations (for example, NullConsole).

All methods that do not return a value are implemented as empty functions.

All methods that return a value will return either (a) a “sensible” value, in the case where the value is critical to the kernel, (b) the same value that Default::default would return, where Default is implemented for the type, or (c) a manually-constructed default value for the type that will make any operations on that type into no-ops.

Exceptions to the rules

Default values

This struct implements the Default trait, these are the values that are set in that constructor:

NullSystem {
    has_requested_return: false,
    is_virtualized: true,
}

Safety

This implementation will never panic directly.

Fields

has_requested_return: bool

Whether to request a kmain return

is_virtualized: bool

Whether to indicate the system is virtualized

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

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

This method tests for !=.

Disable interrupts on the current CPU

Enable interrupts on the current CPU

Halt the current CPU

Return whether interrupts are enabled on the current CPU

Name of the crate implementing this system Read more

Get a reference to the default SystemConsole instance

Has the HAL has requested an immediate kmain return?

Current CPU

Virtualization

kmain loop head hook Read more

kmain inner partial loop hook Read more

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.