Commit df377d0354b8572bd448e85afae72d43d6e071ab

Authored by Nathan Froyd
Committed by Riku Voipio
1 parent 5f106811

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 <froydnj@codesourcery.com>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Showing 1 changed file with 1 additions and 1 deletions
linux-user/mmap.c
... ... @@ -36,7 +36,7 @@
36 36 //#define DEBUG_MMAP
37 37  
38 38 #if defined(USE_NPTL)
39   -pthread_mutex_t mmap_mutex;
  39 +pthread_mutex_t mmap_mutex = PTHREAD_MUTEX_INITIALIZER;
40 40 static int __thread mmap_lock_count;
41 41  
42 42 void mmap_lock(void)
... ...