From 72ba554738f94b4ad3cd745053e5eb6ba3b344b8 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Sat, 23 Apr 2016 10:17:04 +0800 Subject: [PATCH] qemu_thread_join() takes only 1 arg --- qemu/util/qemu-thread-posix.c | 2 +- qemu/util/qemu-thread-win32.c | 3 +-- uc.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/qemu/util/qemu-thread-posix.c b/qemu/util/qemu-thread-posix.c index 59f2a8fb..78bbb75c 100644 --- a/qemu/util/qemu-thread-posix.c +++ b/qemu/util/qemu-thread-posix.c @@ -431,7 +431,7 @@ void qemu_thread_exit(struct uc_struct *uc, void *retval) pthread_exit(retval); } -void *qemu_thread_join(struct uc_struct *uc, QemuThread *thread) +void *qemu_thread_join(QemuThread *thread) { int err; void *ret; diff --git a/qemu/util/qemu-thread-win32.c b/qemu/util/qemu-thread-win32.c index 6aa1e595..97ba69c6 100644 --- a/qemu/util/qemu-thread-win32.c +++ b/qemu/util/qemu-thread-win32.c @@ -298,7 +298,7 @@ void qemu_thread_exit(struct uc_struct *uc, void *arg) _endthreadex(0); } -void *qemu_thread_join(struct uc_struct *uc, QemuThread *thread) +void *qemu_thread_join(QemuThread *thread) { QemuThreadData *data; void *ret; @@ -323,7 +323,6 @@ void *qemu_thread_join(struct uc_struct *uc, QemuThread *thread) ret = data->ret; assert(data->mode != QEMU_THREAD_DETACHED); DeleteCriticalSection(&data->cs); - uc->qemu_thread_data = NULL; g_free(data); return ret; } diff --git a/uc.c b/uc.c index 7bf5b82a..6ab6d3c6 100644 --- a/uc.c +++ b/uc.c @@ -578,7 +578,7 @@ uc_err uc_emu_start(uc_engine* uc, uint64_t begin, uint64_t until, uint64_t time if (timeout) { // wait for the timer to finish - qemu_thread_join(uc, &uc->timer); + qemu_thread_join(&uc->timer); } return uc->invalid_error;