diff options
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/alloc.c b/src/alloc.c index fe37eec9379..64c8cc8264e 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1366,6 +1366,7 @@ void | |||
| 1366 | uninterrupt_malloc () | 1366 | uninterrupt_malloc () |
| 1367 | { | 1367 | { |
| 1368 | #ifdef HAVE_GTK_AND_PTHREAD | 1368 | #ifdef HAVE_GTK_AND_PTHREAD |
| 1369 | #ifdef DOUG_LEA_MALLOC | ||
| 1369 | pthread_mutexattr_t attr; | 1370 | pthread_mutexattr_t attr; |
| 1370 | 1371 | ||
| 1371 | /* GLIBC has a faster way to do this, but lets keep it portable. | 1372 | /* GLIBC has a faster way to do this, but lets keep it portable. |
| @@ -1373,6 +1374,11 @@ uninterrupt_malloc () | |||
| 1373 | pthread_mutexattr_init (&attr); | 1374 | pthread_mutexattr_init (&attr); |
| 1374 | pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE); | 1375 | pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE); |
| 1375 | pthread_mutex_init (&alloc_mutex, &attr); | 1376 | pthread_mutex_init (&alloc_mutex, &attr); |
| 1377 | #else /* !DOUG_LEA_MALLOC */ | ||
| 1378 | /* Some systems such as Solaris 2.6 doesn't have a recursive mutex, | ||
| 1379 | and the bundled gmalloc.c doesn't require it. */ | ||
| 1380 | pthread_mutex_init (&alloc_mutex, NULL); | ||
| 1381 | #endif /* !DOUG_LEA_MALLOC */ | ||
| 1376 | #endif /* HAVE_GTK_AND_PTHREAD */ | 1382 | #endif /* HAVE_GTK_AND_PTHREAD */ |
| 1377 | 1383 | ||
| 1378 | if (__free_hook != emacs_blocked_free) | 1384 | if (__free_hook != emacs_blocked_free) |