Struct crosvm_direct::crosvm::plugin::vcpu::PerVcpuState
source · [−]Expand description
State specific to a VCPU, grouped so that each PluginVcpu object will share a canonical
version.
Fields
pause_request: Option<u64>Implementations
sourceimpl 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
sourceimpl Default for PerVcpuState
impl Default for PerVcpuState
sourcefn default() -> PerVcpuState
fn default() -> PerVcpuState
Returns the “default value” for a type. Read more
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
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>
Convert 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. Read more
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s. Read more
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s. Read more