qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 3/4] iothread: export iothread_stop()


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v2 3/4] iothread: export iothread_stop()
Date: Mon, 25 Sep 2017 10:56:51 +0100
User-agent: Mutt/1.8.3 (2017-05-23)

On Mon, Sep 25, 2017 at 02:37:28PM +0800, Peter Xu wrote:
> So that internal iothread users can explicitly stop one iothread without
> destroying it.
> 
> Since at it, fix iothread_stop() to allow it to be called multiple
> times.  Before this patch we may call iothread_stop() more than once on
> single iothread, while that may not be correct since qemu_thread_join()
> is not allowed to run twice.  From manual of pthread_join():
> 
>   Joining with a thread that has previously been joined results in
>   undefined behavior.
> 
> Signed-off-by: Peter Xu <address@hidden>
> ---
>  include/sysemu/iothread.h |  1 +
>  iothread.c                | 24 ++++++++++++++++--------
>  2 files changed, 17 insertions(+), 8 deletions(-)

Reviewed-by: Stefan Hajnoczi <address@hidden>



reply via email to

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