#[repr(C)]pub struct Tcb {
pub generic: GenericTcb<OsSpecific>,
pub masters_ptr: *mut Master,
pub masters_len: usize,
pub num_copied_masters: usize,
pub linker_ptr: *const Mutex<Linker>,
pub mspace: *const Mutex<Dlmalloc>,
pub pthread: Pthread,
pub dtv_ptr: *mut *mut u8,
pub dtv_len: usize,
}Fields§
§generic: GenericTcb<OsSpecific>§masters_ptr: *mut MasterPointer to a list of initial TLS data
masters_len: usizeSize of the masters list in bytes (multiple of mem::size_of::<Master>())
num_copied_masters: usizeIndex of last copied Master
linker_ptr: *const Mutex<Linker>Pointer to dynamic linker
mspace: *const Mutex<Dlmalloc>pointer to rust memory allocator structure
pthread: PthreadUnderlying pthread_t struct, pthread_self() returns &self.pthread
dtv_ptr: *mut *mut u8§dtv_len: usizeImplementations§
Source§impl Tcb
impl Tcb
Sourcepub unsafe fn new(size: usize) -> Result<&'static mut Self, DlError>
pub unsafe fn new(size: usize) -> Result<&'static mut Self, DlError>
Create a new TCB
size is the size of the TLS in bytes.
Sourcepub unsafe fn copy_masters(&mut self) -> Result<(), DlError>
pub unsafe fn copy_masters(&mut self) -> Result<(), DlError>
Copy data from masters
Sourcepub unsafe fn append_masters(&mut self, new_masters: Vec<Master>)
pub unsafe fn append_masters(&mut self, new_masters: Vec<Master>)
The initial images for TLS
pub fn setup_dtv(&mut self, n: usize)
pub fn dtv_mut(&mut self) -> &'static mut [*mut u8]
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Tcb
impl !RefUnwindSafe for Tcb
impl !Send for Tcb
impl !Sync for Tcb
impl Unpin for Tcb
impl UnsafeUnpin for Tcb
impl !UnwindSafe for Tcb
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more