[][src]Trait zerogc_context::state::RawContext

pub unsafe trait RawContext<C>: Debug + Sealed where
    C: RawCollectorImpl<RawContext = Self>, 
{ pub unsafe fn register_new(
        collector: &CollectorRef<C>
    ) -> ManuallyDrop<Box<Self>>;
pub unsafe fn trigger_safepoint(&self);
pub fn shadow_stack_ptr(&self) -> *mut ShadowStack<C>;
pub unsafe fn collector(&self) -> &C;
pub fn state(&self) -> ContextState; pub unsafe fn assume_valid_shadow_stack(&self) -> &ShadowStack<C> { ... } }

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]

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]

Loading content...

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.

Loading content...

Implementors

impl<C> RawContext<C> for zerogc_context::state::nosync::RawContext<C> where
    C: RawCollectorImpl<RawContext = Self, Manager = CollectionManager<C>>, 
[src]

impl<C> RawContext<C> for zerogc_context::state::sync::RawContext<C> where
    C: SyncCollector<RawContext = Self, Manager = CollectionManager<C>>, 
[src]

Loading content...