#[repr(C, packed(16))]
pub struct TaskStateSegmentHeader { pub privileged_stack: [u64; 3], pub interrupt_stack: [u64; 7], pub io_permission_map_offset: u16, /* private fields */ }
Available on x86-64 only.
Expand description

Stack and I/O permission map pointers that make up the most significant part of a task state segment (TSS).

Since 64-bit mode does not support task switching, the name is a historical artifact, and this does not store any real task state.

Fields§

§privileged_stack: [u64; 3]

Stack pointers to use when switching to privilege levels 0–2.

§interrupt_stack: [u64; 7]

Stack pointers available for use when handling interrupts. The specific entry used is determined by the interrupt_stack_index field of the relevant interrupt gate descriptor.

§io_permission_map_offset: u16

Offset from the start of this structure to start of the IOPermissionBitmap.

The I/O permission map ends at the limit of the containing segment, and must be at least two bytes. If this offset is equal to or greater than the limit, then the permission map is empty and all ports are assumed to be zero.

Not modified by the processor on a task switch.

Implementations§

Create a header with zero-initialized stack pointers and an io_permission_map_offset that points directly after the header.

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
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 !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. 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

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.