[][src]Struct lucet_runtime_internals::instance::execution::KillState

pub struct KillState { /* fields omitted */ }

All instance state a remote kill switch needs to determine if and how to signal that execution should stop.

Some definitions for reference in this struct's documentation:

  • "stopped" means "stop executing at some point before reaching the end of the entrypoint wasm function".
  • "critical section" means what it typically means - an uninterruptable region of code. The detail here is that currently "critical section" and "hostcall" are interchangeable, but in the future this may change. Hostcalls may one day be able to opt out of criticalness, or perhaps guest code may include critical sections.

"Stopped" is a particularly loose word here because it encompasses the worst case: trying to stop a guest that is currently in a critical section. Because the signal will only be checked when exiting the critical section, the latency is bounded by whatever embedder guarantees are made. In fact, it is possible for a kill signal to be successfully sent and still never impactful, if a hostcall itself invokes lucet_hostcall_terminate!. In this circumstance, the hostcall would terminate the instance if it returned, but lucet_hostcall_terminate! will terminate the guest before the termination request would even be checked.

Methods

impl KillState[src]

pub fn new() -> KillState[src]

pub fn is_terminable(&self) -> bool[src]

pub fn enable_termination(&self)[src]

pub fn disable_termination(&self)[src]

pub fn terminable_ptr(&self) -> *const AtomicBool[src]

pub fn begin_hostcall(&self)[src]

pub fn end_hostcall(&self) -> Option<TerminationDetails>[src]

pub fn schedule(&self, tid: pthread_t)[src]

pub fn deschedule(&self)[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self