Re: [Qemu-devel] [PATCH] thread-pool: clean up thread_pool_completion_bh()

2015-04-07 Thread Stefan Hajnoczi
On Thu, Apr 02, 2015 at 05:39:22PM +0100, Stefan Hajnoczi wrote: > This patch simplifies thread_pool_completion_bh(). > > The function first checks elem->state: > > if (elem->state != THREAD_DONE) { > continue; > } > > It then goes on to check elem->state == THREAD_DONE although we alr

Re: [Qemu-devel] [PATCH] thread-pool: clean up thread_pool_completion_bh()

2015-04-02 Thread Paolo Bonzini
On 02/04/2015 18:39, Stefan Hajnoczi wrote: > This patch simplifies thread_pool_completion_bh(). > > The function first checks elem->state: > > if (elem->state != THREAD_DONE) { > continue; > } > > It then goes on to check elem->state == THREAD_DONE although we already > know this mu

[Qemu-devel] [PATCH] thread-pool: clean up thread_pool_completion_bh()

2015-04-02 Thread Stefan Hajnoczi
This patch simplifies thread_pool_completion_bh(). The function first checks elem->state: if (elem->state != THREAD_DONE) { continue; } It then goes on to check elem->state == THREAD_DONE although we already know this must be the case. The QLIST_REMOVE() is duplicated down both branch