pub struct TlsData<'tcx> { /* private fields */ }
Implementations§
source§impl<'tcx> TlsData<'tcx>
impl<'tcx> TlsData<'tcx>
sourcepub fn create_tls_key(
&mut self,
dtor: Option<Instance<'tcx>>,
max_size: Size
) -> InterpResult<'tcx, u128>
pub fn create_tls_key( &mut self, dtor: Option<Instance<'tcx>>, max_size: Size ) -> InterpResult<'tcx, u128>
Generate a new TLS key with the given destructor.
max_size
determines the integer size the key has to fit in.
pub fn delete_tls_key(&mut self, key: u128) -> InterpResult<'tcx>
pub fn load_tls( &self, key: u128, thread_id: ThreadId, cx: &impl HasDataLayout ) -> InterpResult<'tcx, Scalar<Provenance>>
pub fn store_tls( &mut self, key: u128, thread_id: ThreadId, new_data: Scalar<Provenance>, cx: &impl HasDataLayout ) -> InterpResult<'tcx>
sourcepub fn set_macos_thread_dtor(
&mut self,
thread: ThreadId,
dtor: Instance<'tcx>,
data: Scalar<Provenance>
) -> InterpResult<'tcx>
pub fn set_macos_thread_dtor( &mut self, thread: ThreadId, dtor: Instance<'tcx>, data: Scalar<Provenance> ) -> InterpResult<'tcx>
Set the thread wide destructor of the thread local storage for the given
thread. This function is used to implement _tlv_atexit
shim on MacOS.
Thread wide dtors are available only on MacOS. There is one destructor
per thread as can be guessed from the following comment in the
_tlv_atexit
implementation:
NOTE: this does not need locks because it only operates on current thread data
Trait Implementations§
source§impl VisitProvenance for TlsData<'_>
impl VisitProvenance for TlsData<'_>
fn visit_provenance(&self, visit: &mut VisitWith<'_>)
Auto Trait Implementations§
impl<'tcx> Freeze for TlsData<'tcx>
impl<'tcx> !RefUnwindSafe for TlsData<'tcx>
impl<'tcx> Send for TlsData<'tcx>
impl<'tcx> Sync for TlsData<'tcx>
impl<'tcx> Unpin for TlsData<'tcx>
impl<'tcx> !UnwindSafe for TlsData<'tcx>
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