From: Nathan Froyd Date: Thu, 4 Jun 2009 18:51:56 +0000 (-0700) Subject: linux-user: initialize mmap_mutex properly X-Git-Tag: TizenStudio_2.0_p2.3~8676 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3531cb70482179f8a7c437d1315409c64cf92181;p=sdk%2Femulator%2Fqemu.git linux-user: initialize mmap_mutex properly We initialize mmap_mutex in any child threads/processes, but we need to correctly statically initialize it for the original process. Signed-off-by: Nathan Froyd Signed-off-by: Riku Voipio --- 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)