Expand description
State specific to a VCPU, grouped so that each PluginVcpu
object will share a canonical
version.
Fields§
§pause_request: Option<u64>
Implementations§
source§impl PerVcpuState
impl PerVcpuState
sourcepub fn request_pause(&mut self, data: u64)
pub fn request_pause(&mut self, data: u64)
Indicates that a VCPU should wait until the plugin process resumes the VCPU.
This method will not cause a VCPU to pause immediately. Instead, the VCPU thread will
continue running until a interrupted, at which point it will check for a pending pause. If
there is another call to request_pause
for this VCPU before that happens, the last pause
request’s data
will be overwritten with the most recent `data.
To get an immediate pause after calling request_pause
, send a signal (with a registered
handler) to the thread handling the VCPU corresponding to this state. This should interrupt
the running VCPU, which should check for a pause with PluginVcpu::pre_run
.
Trait Implementations§
source§impl Default for PerVcpuState
impl Default for PerVcpuState
source§fn default() -> PerVcpuState
fn default() -> PerVcpuState
Auto Trait Implementations§
impl RefUnwindSafe for PerVcpuState
impl Send for PerVcpuState
impl Sync for PerVcpuState
impl Unpin for PerVcpuState
impl UnwindSafe for PerVcpuState
Blanket Implementations§
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.