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

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).