Re: [Qemu-devel] [PATCH v2 1/5] iothread: replace init_done_cond with a semaphore

2019-03-06 Thread Peter Xu
On Wed, Mar 06, 2019 at 07:55:28PM +0800, Peter Xu wrote: > Only sending an init-done message using lock+cond seems an overkill to > me. Replacing it with a simpler semaphore. > > Meanwhile, init the semaphore unconditionally, then we can destroy it > unconditionally too in finalize which seems c

[Qemu-devel] [PATCH v2 1/5] iothread: replace init_done_cond with a semaphore

2019-03-06 Thread Peter Xu
Only sending an init-done message using lock+cond seems an overkill to me. Replacing it with a simpler semaphore. Meanwhile, init the semaphore unconditionally, then we can destroy it unconditionally too in finalize which seems cleaner. Signed-off-by: Peter Xu --- include/sysemu/iothread.h |