mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-13 02:44:24 +00:00
consistent Currently the vcpu_make_request and signal_event in vcpu_lock_instr_emulation does not check whether target VCPU is up and running. This can cause problems because when VCPU is created but not launched, vcpu_make_request will not trigger wait_event on target VCPU, but signal_event may still execute to reduce the counter. This patch adds a check before vcpu_make_request and signal_event to make sure the request and signal are issued after target VCPU is up. Tracked-On: #6502 Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
17 lines
364 B
C
17 lines
364 B
C
#ifndef EVENT_H
|
|
#define EVENT_H
|
|
#include <asm/lib/spinlock.h>
|
|
|
|
struct sched_event {
|
|
spinlock_t lock;
|
|
int32_t nqueued;
|
|
struct thread_object* waiting_thread;
|
|
};
|
|
|
|
void init_event(struct sched_event *event);
|
|
void reset_event(struct sched_event *event);
|
|
void wait_event(struct sched_event *event);
|
|
void signal_event(struct sched_event *event);
|
|
|
|
#endif /* EVENT_H */
|