Struct context_switch::Context

pub struct Context { /* private fields */ }
Expand description

The registers saved before a context switch and restored after a context switch for SSE-enabled Tasks.

Note: the order of the registers here MUST MATCH the order of registers popped in the [restore_registers_sse!] macro.

Implementations§

Creates a new ContextSSE struct that will cause the SSE-enabled Task containing it to begin its execution at the given rip.

Sets the value of the first regular (non-SSE) register to the given value.

This is useful for storing a value (e.g., task ID) in that register and then recovering it later with read_first_register().

On x86_64, this sets the r15 register.

Trait Implementations§

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

Returns the argument unchanged.

Calls U::from(self).

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

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.