qemu_thread_join() takes only 1 arg

This commit is contained in:
Nguyen Anh Quynh 2016-04-23 10:17:04 +08:00
parent 3a742fb6f6
commit 72ba554738
3 changed files with 3 additions and 4 deletions

View file

@ -431,7 +431,7 @@ void qemu_thread_exit(struct uc_struct *uc, void *retval)
pthread_exit(retval); pthread_exit(retval);
} }
void *qemu_thread_join(struct uc_struct *uc, QemuThread *thread) void *qemu_thread_join(QemuThread *thread)
{ {
int err; int err;
void *ret; void *ret;

View file

@ -298,7 +298,7 @@ void qemu_thread_exit(struct uc_struct *uc, void *arg)
_endthreadex(0); _endthreadex(0);
} }
void *qemu_thread_join(struct uc_struct *uc, QemuThread *thread) void *qemu_thread_join(QemuThread *thread)
{ {
QemuThreadData *data; QemuThreadData *data;
void *ret; void *ret;
@ -323,7 +323,6 @@ void *qemu_thread_join(struct uc_struct *uc, QemuThread *thread)
ret = data->ret; ret = data->ret;
assert(data->mode != QEMU_THREAD_DETACHED); assert(data->mode != QEMU_THREAD_DETACHED);
DeleteCriticalSection(&data->cs); DeleteCriticalSection(&data->cs);
uc->qemu_thread_data = NULL;
g_free(data); g_free(data);
return ret; return ret;
} }

2
uc.c
View file

@ -578,7 +578,7 @@ uc_err uc_emu_start(uc_engine* uc, uint64_t begin, uint64_t until, uint64_t time
if (timeout) { if (timeout) {
// wait for the timer to finish // wait for the timer to finish
qemu_thread_join(uc, &uc->timer); qemu_thread_join(&uc->timer);
} }
return uc->invalid_error; return uc->invalid_error;