mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +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:
parent
b107bfcf2c
commit
9dcd0c37f3
@ -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(())
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user