mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-07-15 16:12:58 +00:00
tools: acrnd: Fix launch UOS by timer list without fork()
When acrnd_vm_timer_func() launch UOS, it need fork() and run, so that do not block the main process. Tracked-On: #2306 Signed-off-by: Tao Yuhong <yuhong.tao@intel.com> Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
This commit is contained in:
parent
377fdea08d
commit
d7199ccc3b
@ -122,6 +122,7 @@ unsigned get_sos_wakeup_reason(void);
|
||||
void acrnd_vm_timer_func(struct work_arg *arg)
|
||||
{
|
||||
struct vmmngr_struct *vm;
|
||||
pid_t pid;
|
||||
|
||||
if (!arg) {
|
||||
pdebug();
|
||||
@ -137,7 +138,9 @@ void acrnd_vm_timer_func(struct work_arg *arg)
|
||||
|
||||
switch (vm->state) {
|
||||
case VM_CREATED:
|
||||
acrnd_run_vm(arg->name);
|
||||
pid = fork();
|
||||
if (!pid)
|
||||
acrnd_run_vm(vm->name);
|
||||
break;
|
||||
case VM_SUSPENDED:
|
||||
resume_vm(arg->name, CBC_WK_RSN_RTC);
|
||||
|
Loading…
Reference in New Issue
Block a user