qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 4/5] qemu_thread_create: propagate the error to


From: Fei Li
Subject: Re: [Qemu-devel] [PATCH 4/5] qemu_thread_create: propagate the error to callers to check
Date: Wed, 5 Sep 2018 12:20:08 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1



On 09/04/2018 07:18 PM, Daniel P. Berrangé wrote:
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
--- a/include/qemu/thread.h
+++ b/include/qemu/thread.h
@@ -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
this patch.

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
build succeeds.

Regards,
Daniel
Oops, thanks for the reminder! Will merge them into one in the next version.

Have a nice day
Fei



reply via email to

[Prev in Thread] Current Thread [Next in Thread]