qemu-devel
[Top][All Lists]
Advanced

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

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


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] thread-pool: clean up thread_pool_completion_bh()
Date: Tue, 7 Apr 2015 14:45:19 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

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 already
> know this must be the case.
> 
> The QLIST_REMOVE() is duplicated down both branches of an if-else
> statement so that can be lifted out as well.
> 
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> ---
>  thread-pool.c | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)

Thanks, applied to my block-next tree:
https://github.com/stefanha/qemu/commits/block-next

Stefan

Attachment: pgp59LrTA1v3y.pgp
Description: PGP signature


reply via email to

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