mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: cpu: Clear the "kill" flag on vCPU to support reuse
After the vCPU has been ejected and the thread shutdown it is useful to clear the "kill" flag so that if the vCPU is reused it does not immediately exit upon thread recreation. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
@@ -900,6 +900,10 @@ impl CpuManager {
|
||||
state.signal_thread();
|
||||
state.join_thread()?;
|
||||
state.handle = None;
|
||||
|
||||
// Once the thread has exited, clear the "kill" so that it can reused
|
||||
state.kill.store(false, Ordering::SeqCst);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user