mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
hv: remove 'running' from vcpu structure
vcpu->running is duplicated with THREAD_STS_RUNNING status of thread object. Introduce an API sleep_thread_sync(), which can utilize the inner status of thread object, to do the sync sleep for zombie_vcpu(). Tracked-On: #5057 Signed-off-by: Conghui Chen <conghui.chen@intel.com> Reviewed-by: Shuo A Liu <shuo.a.liu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -265,7 +265,6 @@ struct acrn_vcpu {
|
||||
|
||||
struct thread_object thread_obj;
|
||||
bool launched; /* Whether the vcpu is launched on target pcpu */
|
||||
volatile bool running; /* vcpu is picked up and run? */
|
||||
|
||||
struct instr_emul_ctxt inst_ctxt;
|
||||
struct io_request req; /* used by io/ept emulation */
|
||||
|
@@ -114,6 +114,7 @@ bool need_reschedule(uint16_t pcpu_id);
|
||||
|
||||
void run_thread(struct thread_object *obj);
|
||||
void sleep_thread(struct thread_object *obj);
|
||||
void sleep_thread_sync(struct thread_object *obj);
|
||||
void wake_thread(struct thread_object *obj);
|
||||
void kick_thread(const struct thread_object *obj);
|
||||
void yield_current(void);
|
||||
|
Reference in New Issue
Block a user