From 6daa8581cd0d825f850fb9ad19a83dc464318a58 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Fri, 20 Jan 2017 16:12:49 +0800 Subject: [PATCH] win32_start_routine() looks broken. TODO --- qemu/util/qemu-thread-win32.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qemu/util/qemu-thread-win32.c b/qemu/util/qemu-thread-win32.c index 3a85e6a4..26fe5cd8 100644 --- a/qemu/util/qemu-thread-win32.c +++ b/qemu/util/qemu-thread-win32.c @@ -49,11 +49,13 @@ static unsigned __stdcall win32_start_routine(void *arg) void *(*start_routine)(void *) = data->start_routine; void *thread_arg = data->arg; +#if 0 if (data->mode == QEMU_THREAD_DETACHED) { data->uc->qemu_thread_data = NULL; g_free(data); - data = NULL; } +#endif + qemu_thread_exit(data->uc, start_routine(thread_arg)); abort(); } @@ -99,7 +101,7 @@ void *qemu_thread_join(QemuThread *thread) DeleteCriticalSection(&data->cs); data->uc->qemu_thread_data = NULL; g_free(data); - data = NULL; + return ret; }