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: Daniel P . Berrangé
Subject: Re: [Qemu-devel] [PATCH 4/5] qemu_thread_create: propagate the error to callers to check
Date: Tue, 4 Sep 2018 12:18:22 +0100
User-agent: Mutt/1.10.1 (2018-07-13)

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
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



reply via email to

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