qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 19/21] linux-user: initialize mmap_mutex properly


From: riku . voipio
Subject: [Qemu-devel] [PATCH 19/21] linux-user: initialize mmap_mutex properly
Date: Fri, 12 Jun 2009 16:50:29 +0300

From: Nathan Froyd <address@hidden>

We initialize mmap_mutex in any child threads/processes, but we need to
correctly statically initialize it for the original process.

From: Nathan Froyd <address@hidden>
Signed-off-by: Nathan Froyd <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
---
 linux-user/mmap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index aa5813f..aa22006 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -36,7 +36,7 @@
 //#define DEBUG_MMAP
 
 #if defined(USE_NPTL)
-pthread_mutex_t mmap_mutex;
+pthread_mutex_t mmap_mutex = PTHREAD_MUTEX_INITIALIZER;
 static int __thread mmap_lock_count;
 
 void mmap_lock(void)
-- 
1.6.2.1





reply via email to

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