[−][src]Trait zerogc_context::state::RawContext
The underlying state of a context
Each context is bound to one and only one thread, even if the collector supports multi-threading.
Required methods
pub unsafe fn register_new(
collector: &CollectorRef<C>
) -> ManuallyDrop<Box<Self>>
[src]
collector: &CollectorRef<C>
) -> ManuallyDrop<Box<Self>>
pub unsafe fn trigger_safepoint(&self)
[src]
Trigger a safepoint for this context.
This implicitly attempts a collection, potentially blocking until completion..
Undefined behavior if mutated during collection
pub fn shadow_stack_ptr(&self) -> *mut ShadowStack<C>
[src]
Get a pointer to the shadow stack
pub unsafe fn collector(&self) -> &C
[src]
Get a reference to the collector, assuming that it's valid
pub fn state(&self) -> ContextState
[src]
Provided methods
pub unsafe fn assume_valid_shadow_stack(&self) -> &ShadowStack<C>
[src]
Borrow a reference to the shadow stack, assuming this context is valid (not active).
A context is valid if it is either frozen or paused at a safepoint.
Implementors
impl<C> RawContext<C> for zerogc_context::state::nosync::RawContext<C> where
C: RawCollectorImpl<RawContext = Self, Manager = CollectionManager<C>>,
[src]
C: RawCollectorImpl<RawContext = Self, Manager = CollectionManager<C>>,
pub unsafe fn register_new(
collector: &CollectorRef<C>
) -> ManuallyDrop<Box<Self>>
[src]
collector: &CollectorRef<C>
) -> ManuallyDrop<Box<Self>>
pub unsafe fn trigger_safepoint(&self)
[src]
pub fn shadow_stack_ptr(&self) -> *mut ShadowStack<C>
[src]
pub unsafe fn collector(&self) -> &C
[src]
pub fn state(&self) -> ContextState
[src]
impl<C> RawContext<C> for zerogc_context::state::sync::RawContext<C> where
C: SyncCollector<RawContext = Self, Manager = CollectionManager<C>>,
[src]
C: SyncCollector<RawContext = Self, Manager = CollectionManager<C>>,
pub unsafe fn register_new(
collector: &CollectorRef<C>
) -> ManuallyDrop<Box<Self>>
[src]
collector: &CollectorRef<C>
) -> ManuallyDrop<Box<Self>>