wait for the timer thread to finish at the end of uc_emu_start(). this may fix the issue #78

This commit is contained in:
Nguyen Anh Quynh 2015-08-30 05:12:04 +08:00
parent 9b84beaf25
commit b4d7347fa8
1 changed files with 5 additions and 0 deletions

5
uc.c
View File

@ -549,6 +549,11 @@ uc_err uc_emu_start(uch handle, uint64_t begin, uint64_t until, uint64_t timeout
// emulation is done
uc->emulation_done = true;
if (timeout) {
// wait for the timer to finish
qemu_thread_join(&uc->timer);
}
return uc->invalid_error;
}