# HG changeset patch # User YAMAMOTO Mitsuharu # Date 1207965536 0 # Node ID 07f3d63ad3d397a262acb2be129bceb4b7fe3f95 # Parent 9699ee3d1437e9f80c0a6ef792e05f27d482bb8d [!SYSTEM_MALLOC && !SYNC_INPUT] (uninterrupt_malloc) [HAVE_GTK_AND_PTHREAD && !DOUG_LEA_MALLOC]: Don't use recursive mutex. diff -r 9699ee3d1437 -r 07f3d63ad3d3 src/alloc.c --- a/src/alloc.c Fri Apr 11 18:59:13 2008 +0000 +++ b/src/alloc.c Sat Apr 12 01:58:56 2008 +0000 @@ -1356,6 +1356,7 @@ uninterrupt_malloc () { #ifdef HAVE_GTK_AND_PTHREAD +#ifdef DOUG_LEA_MALLOC pthread_mutexattr_t attr; /* GLIBC has a faster way to do this, but lets keep it portable. @@ -1363,6 +1364,11 @@ pthread_mutexattr_init (&attr); pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE); pthread_mutex_init (&alloc_mutex, &attr); +#else /* !DOUG_LEA_MALLOC */ + /* Some systems such as Solaris 2.6 doesn't have a recursive mutex, + and the bundled gmalloc.c doesn't require it. */ + pthread_mutex_init (&alloc_mutex, NULL); +#endif /* !DOUG_LEA_MALLOC */ #endif /* HAVE_GTK_AND_PTHREAD */ if (__free_hook != emacs_blocked_free)