[−][src]Struct sunrise_libuser::thread_local_storage::TlsElf
The Thread Local Storage manager for a thread
We allocate one for every thread we create, and store it in the thread's context. When it is dropped, all allocated memory is freed.
Fields
static_region: ThreadLocalStaticRegion
The array of static module blocks + TCB
Implementations
impl TlsElf
[src]
pub fn allocate() -> Self
[src]
Allocates and initializes the static region, including TCB.
Finds out the location of the initialization image from linker defined symbols.
pub unsafe fn enable_for_current_thread(&self)
[src]
Calls syscalls::set_thread_area
with the address of this TlsElf's ThreadControlBlock
.
Safety
The TlsElf should not be enabled_for_current_thread by any other thread. Having a TLS shared by multiple threads is UB.
Panics
Panics if the syscall returned an error, as this is unrecoverable.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TlsElf
impl Send for TlsElf
impl Sync for TlsElf
impl Unpin for TlsElf
impl UnwindSafe for TlsElf
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SizedIPCBuffer for T
[src]
fn size(&Self) -> usize
[src]
fn is_cool(usize, usize) -> bool
[src]
unsafe fn from_raw_parts<'a>(usize, usize) -> &'a T
[src]
unsafe fn from_raw_parts_mut<'a>(usize, usize) -> &'a mut T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,