qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH v2] rfifolock: no need to get thread identifier when


From: Changlong Xie
Subject: [Qemu-devel] [PATCH v2] rfifolock: no need to get thread identifier when nesting
Date: Tue, 10 May 2016 17:59:08 +0800

Signed-off-by: Changlong Xie <address@hidden>
---
 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






reply via email to

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