[][src]Struct sunrise_libuser::threads::ThreadContext

#[repr(C)]pub struct ThreadContext {
    entry_point: fn(_: usize),
    arg: usize,
    stack: Option<StackContext>,
    tls_elf: Once<TlsElf>,
    thread_handle: Once<ThreadHandle>,
}

Structure holding the thread local context of a thread. Allocated at thread creation by the creator of the thread.

Fields

entry_point: fn(_: usize)

Pointer to the function this thread should execute after all its set-up in thread_trampoline is done.

arg: usize

The argument to call it with.

stack: Option<StackContext>

The stack used by this thread.

None for the main thread's stack, since it was not allocated by us and will never be freed as it'll be the last thread alive.

Some for every other thread.

tls_elf: Once<TlsElf>

The thread local storage of this thread.

This is where #[thread_local] statics live.

thread_handle: Once<ThreadHandle>

The ThreadHandle of this thread.

The thread needs to be able to access its own ThreadHandle at anytime to be able to use mutexes.

Trait Implementations

impl Debug for ThreadContext[src]

Auto Trait Implementations

impl !RefUnwindSafe for ThreadContext

impl Send for ThreadContext

impl Sync for ThreadContext

impl Unpin for ThreadContext

impl UnwindSafe for ThreadContext

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> SizedIPCBuffer for 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.