This commit is contained in:
Nguyen Anh Quynh
2016-01-10 23:10:00 +08:00
parent 036763d6ae
commit 580bc7b56a
4 changed files with 8 additions and 25 deletions

View File

@@ -77,7 +77,7 @@ void pause_all_vcpus(struct uc_struct *uc)
CPUState *cpu;
CPU_FOREACH(cpu) {
qemu_thread_join(uc, cpu->thread); // qq: fix qemu_thread_join() to work for instance
qemu_thread_join(uc, cpu->thread);
free(cpu->thread);
cpu->thread = NULL;
}
@@ -149,17 +149,6 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
}
while (1) {
#if 0
int count = 0;
if (count < 10) {
count++;
unsigned int eip = X86_CPU(mycpu)->env.eip;
printf(">>> current EIP = %x\n", eip);
printf(">>> ECX = %x\n", (unsigned int)X86_CPU(mycpu)->env.regs[R_ECX]);
printf(">>> EDX = %x\n", (unsigned int)X86_CPU(mycpu)->env.regs[R_EDX]);
}
#endif
if (tcg_exec_all(uc))
break;
}
@@ -170,7 +159,7 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
qemu_cond_destroy(cpu->halt_cond);
free(cpu->halt_cond);
#ifdef _WIN32
if(cpu->hThread)
if (cpu->hThread)
CloseHandle(cpu->hThread);
#endif
cpu->halt_cond = NULL;