[][src]Struct sunrise_libkern::TLS

#[repr(C, align(16))]pub struct TLS {
    pub ptr_self: *mut TLS,
    _reserved0: [u8; 8],
    pub ipc_command_buffer: IpcBuffer,
    _reserved1: [u8; 232],
    pub ptr_thread_context: usize,
}

Thread Local Storage region.

The kernel allocates one for every thread, and makes a register point (indirectly) to it so that the userspace can access it at any time.

Fields

ptr_self: *mut TLS

Pointer pointing to this TLS region (i.e pointing to itself). Set by the kernel.

x86 uses the segmentation for accessing the TLS, and it has no way to translate fs:0x0 to an address in the flat segmentation model that every other segment uses.

This pointer serves as a translation.

_reserved0: [u8; 8]

reserved or unknown.

ipc_command_buffer: IpcBuffer

Buffer used for IPC. Kernel reads, interprets, and copies data from/to it.

_reserved1: [u8; 232]

reserved or unknown.

ptr_thread_context: usize

User controlled pointer to thread context. Not observed by the kernel.

Trait Implementations

impl Debug for TLS[src]

fn fmt(&self, f: &mut Formatter) -> Result<(), Error>[src]

Debug on TLS displays only the address of the IPC command buffer, and ptr_thread_context.

Auto Trait Implementations

impl !Send for TLS

impl !Sync for TLS

impl Unpin for TLS

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.