diff options
author | Nathan Froyd <froydnj@codesourcery.com> | 2009-06-04 11:51:56 -0700 |
---|---|---|
committer | Riku Voipio <riku.voipio@nokia.com> | 2009-06-16 16:58:45 +0300 |
commit | df377d0354b8572bd448e85afae72d43d6e071ab (patch) | |
tree | 7a49e2d442e6d010c7f1b5951a61d29318fb43fd /linux-user | |
parent | 5f10681186e3a993b534c58ef0a57477ea47e505 (diff) |
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>
Diffstat (limited to 'linux-user')
-rw-r--r-- | 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 aa5813f148..aa22006ff3 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) |