[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 3/4] iothread: export iothread_stop()
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] [PATCH v2 3/4] iothread: export iothread_stop() |
Date: |
Mon, 25 Sep 2017 15:30:02 +0800 |
User-agent: |
Mutt/1.8.3 (2017-05-23) |
On Mon, 09/25 14:37, 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>
Reviewed-by: Fam Zheng <address@hidden>
[Qemu-devel] [PATCH v2 2/4] iothread: provide helpers for internal use, Peter Xu, 2017/09/25
[Qemu-devel] [PATCH v2 3/4] iothread: export iothread_stop(), Peter Xu, 2017/09/25
[Qemu-devel] [PATCH v2 4/4] iothread: delay the context release to finalize, Peter Xu, 2017/09/25