From 2d9db36a2b79afe995c39d07de4db5378deb0e7b Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Wed, 2 Sep 2015 01:34:23 -0700 Subject: [PATCH] fix some errors introduced by the last commit on qemu-thread-win32.c --- qemu/util/qemu-thread-win32.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qemu/util/qemu-thread-win32.c b/qemu/util/qemu-thread-win32.c index 51ca88f8..3f7f7015 100644 --- a/qemu/util/qemu-thread-win32.c +++ b/qemu/util/qemu-thread-win32.c @@ -16,6 +16,8 @@ #include #include +#include "uc_priv.h" + static void error_exit(int err, const char *msg) { @@ -264,6 +266,7 @@ struct QemuThreadData { bool exited; void *ret; CRITICAL_SECTION cs; + struct uc_struct *uc; }; static unsigned __stdcall win32_start_routine(void *arg) @@ -276,7 +279,7 @@ static unsigned __stdcall win32_start_routine(void *arg) g_free(data); data = NULL; } - qemu_thread_exit(start_routine(thread_arg)); + qemu_thread_exit(data->uc, start_routine(thread_arg)); abort(); } @@ -335,6 +338,8 @@ void qemu_thread_create(struct uc_struct *uc, QemuThread *thread, const char *na data->arg = arg; data->mode = mode; data->exited = false; + data->uc = uc; + uc->qemu_thread_data = data; if (data->mode != QEMU_THREAD_DETACHED) {