From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Sixt Subject: Re: [PATCH v2] Make xmalloc and xrealloc thread-safe Date: Wed, 7 Apr 2010 20:49:08 +0200 Message-ID: <201004072049.08819.j6t@kdbg.org> References: <20100407144555.GA23911@fredrik-laptop> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: Nicolas Pitre , Shawn Pearce , Junio C Hamano , git@vger.kernel.org To: Fredrik Kuivinen X-From: git-owner@vger.kernel.org Wed Apr 07 20:51:30 2010 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NzaLZ-0003VS-31 for gcvg-git-2@lo.gmane.org; Wed, 07 Apr 2010 20:51:29 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758049Ab0DGSvY (ORCPT ); Wed, 7 Apr 2010 14:51:24 -0400 Received: from bsmtp4.bon.at ([195.3.86.186]:36675 "EHLO bsmtp.bon.at" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756503Ab0DGSvX (ORCPT ); Wed, 7 Apr 2010 14:51:23 -0400 Received: from dx.sixt.local (unknown [93.83.142.38]) by bsmtp.bon.at (Postfix) with ESMTP id AE962CDF92; Wed, 7 Apr 2010 20:51:20 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by dx.sixt.local (Postfix) with ESMTP id E4F4F19F5BF; Wed, 7 Apr 2010 20:49:08 +0200 (CEST) User-Agent: KMail/1.9.10 In-Reply-To: <20100407144555.GA23911@fredrik-laptop> Content-Disposition: inline Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Mittwoch, 7. April 2010, Fredrik Kuivinen wrote: > As I mentioned in another mail in this thread, our mutex > implementation on WIN32 already is recursive. It is implemented on top > of the CRITICAL_SECTION type, which is recursive. See > http://msdn.microsoft.com/en-us/library/ms682530%28VS.85%29.aspx Very true! > + if (pthread_mutexattr_settype(&a, PTHREAD_MUTEX_RECURSIVE)) I wonder how many pthreads implementations there are that do not support recursive mutexes... -- Hannes