qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] rfifolock: no need to get thread identifier when nesting
@ 2016-05-10  9:59 Changlong Xie
  2016-05-10 10:25 ` Denis V. Lunev
  2016-05-12  9:42 ` Stefan Hajnoczi
  0 siblings, 2 replies; 3+ messages in thread
From: Changlong Xie @ 2016-05-10  9:59 UTC (permalink / raw)
  To: qemu devel, Stefan Hajnoczi; +Cc: Wen Congyang, Changlong Xie

Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com>
---
 util/rfifolock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/rfifolock.c b/util/rfifolock.c
index c22f5fe..084c2f0 100644
--- a/util/rfifolock.c
+++ b/util/rfifolock.c
@@ -58,9 +58,9 @@ void rfifolock_lock(RFifoLock *r)
             }
             qemu_cond_wait(&r->cond, &r->lock);
         }
+        qemu_thread_get_self(&r->owner_thread);
     }
 
-    qemu_thread_get_self(&r->owner_thread);
     r->nesting++;
     qemu_mutex_unlock(&r->lock);
 }
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH v2] rfifolock: no need to get thread identifier when nesting
  2016-05-10  9:59 [Qemu-devel] [PATCH v2] rfifolock: no need to get thread identifier when nesting Changlong Xie
@ 2016-05-10 10:25 ` Denis V. Lunev
  2016-05-12  9:42 ` Stefan Hajnoczi
  1 sibling, 0 replies; 3+ messages in thread
From: Denis V. Lunev @ 2016-05-10 10:25 UTC (permalink / raw)
  To: Changlong Xie, qemu devel, Stefan Hajnoczi

On 05/10/2016 12:59 PM, Changlong Xie wrote:
> Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com>
> ---
>   util/rfifolock.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/util/rfifolock.c b/util/rfifolock.c
> index c22f5fe..084c2f0 100644
> --- a/util/rfifolock.c
> +++ b/util/rfifolock.c
> @@ -58,9 +58,9 @@ void rfifolock_lock(RFifoLock *r)
>               }
>               qemu_cond_wait(&r->cond, &r->lock);
>           }
> +        qemu_thread_get_self(&r->owner_thread);
>       }
>   
> -    qemu_thread_get_self(&r->owner_thread);
>       r->nesting++;
>       qemu_mutex_unlock(&r->lock);
>   }
Reviewed-by: Denis V. Lunev <den@openvz.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH v2] rfifolock: no need to get thread identifier when nesting
  2016-05-10  9:59 [Qemu-devel] [PATCH v2] rfifolock: no need to get thread identifier when nesting Changlong Xie
  2016-05-10 10:25 ` Denis V. Lunev
@ 2016-05-12  9:42 ` Stefan Hajnoczi
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2016-05-12  9:42 UTC (permalink / raw)
  To: Changlong Xie; +Cc: qemu devel, Wen Congyang

[-- Attachment #1: Type: text/plain, Size: 294 bytes --]

On Tue, May 10, 2016 at 05:59:08PM +0800, Changlong Xie wrote:
> Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com>
> ---
>  util/rfifolock.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

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

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-12  9:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-10  9:59 [Qemu-devel] [PATCH v2] rfifolock: no need to get thread identifier when nesting Changlong Xie
2016-05-10 10:25 ` Denis V. Lunev
2016-05-12  9:42 ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).