From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MCN5k-0003q1-DO for qemu-devel@nongnu.org; Thu, 04 Jun 2009 20:15:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MCN5b-0003kI-Vc for qemu-devel@nongnu.org; Thu, 04 Jun 2009 20:15:24 -0400 Received: from [199.232.76.173] (port=48109 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MCMRa-0007fT-7o for qemu-devel@nongnu.org; Thu, 04 Jun 2009 19:33:58 -0400 Received: from mx20.gnu.org ([199.232.41.8]:37830) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MCISc-0007bh-GK for qemu-devel@nongnu.org; Thu, 04 Jun 2009 15:18:46 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MCISb-0005nc-FH for qemu-devel@nongnu.org; Thu, 04 Jun 2009 15:18:45 -0400 From: Nathan Froyd Date: Thu, 4 Jun 2009 11:51:56 -0700 Message-Id: <1244141522-21802-2-git-send-email-froydnj@codesourcery.com> In-Reply-To: <1244141522-21802-1-git-send-email-froydnj@codesourcery.com> References: <1244141522-21802-1-git-send-email-froydnj@codesourcery.com> Subject: [Qemu-devel] [PATCH 1/7] linux-user: initialize mmap_mutex properly List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- 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 6f300a0..a21b558 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.3.2