On Tue, Sep 04, 2018 at 07:08:21PM +0800, Fei Li wrote:
Add a new Error paramater for qemu_thread_create() to indicate if it
succeeds rather than failing with an error. And propagate the error
to let the callers check it.
Besides, directly return if thread->data is NULL to avoid the
segmentation fault in qemu_thread_join in qemu-thread-win32.c.
Signed-off-by: Fei Li <address@hidden>
include/qemu/thread.h | 2 +-
util/qemu-thread-posix.c | 15 +++++++++++----
util/qemu-thread-win32.c | 12 +++++++++---
3 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/include/qemu/thread.h b/include/qemu/thread.h
index dacebcfff0..71d8be5851 100644
@@ -137,7 +137,7 @@ void qemu_event_destroy(QemuEvent *ev);
void qemu_thread_create(QemuThread *thread, const char *name,
void *(*start_routine)(void *),
- void *arg, int mode);
+ void *arg, int mode, Error **errp);
You've changed the API signature in this patch, but don't update any of
the callers until the next patch. This means that the build will fail on
In order to ensure that "git bisect" can be usable we require that the
code is able to build sucessfully on every patch in a series.
So I think you'll have to merge patch 5 into this patch to ensure the