[−][src]Struct lucet_runtime_internals::instance::execution::KillState
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
impl Send for KillState
impl Sync for KillState
impl Unpin for KillState
impl UnwindSafe for KillState
impl !RefUnwindSafe for KillState
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self