Re: [PATCH v2] Make xmalloc and xrealloc thread-safe
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Apr 7, 2010, 18:49 UTC
- Message-ID
- <201004072049.08819.j6t@kdbg.org>
- In-Reply-To
- <20100407144555.GA23911@fredrik-laptop>
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