diff options
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 2008-04-12 01:59:22 +0000 |
---|---|---|
committer | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 2008-04-12 01:59:22 +0000 |
commit | a1b41389e4069747940c87b477f11852ec86d9f3 (patch) | |
tree | ce00e07f955490e97cf81b037252687acdc0f11b /src | |
parent | 4cbb903fcb853c42b32a4101f03dc3c56077b35f (diff) | |
download | emacs-a1b41389e4069747940c87b477f11852ec86d9f3.tar.gz |
[!SYSTEM_MALLOC && !SYNC_INPUT] (uninterrupt_malloc)
[HAVE_GTK_AND_PTHREAD && !DOUG_LEA_MALLOC]: Don't use recursive mutex.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/alloc.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 0dabe60be18..56676ea95d6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-04-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> + + * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT] (uninterrupt_malloc) + [HAVE_GTK_AND_PTHREAD && !DOUG_LEA_MALLOC]: Don't use recursive mutex. + 2008-04-11 Katsumi Yamaoka <yamaoka@jpl.org> * puresize.h (BASE_PURESIZE): Increase to 1140000. diff --git a/src/alloc.c b/src/alloc.c index 153c54e0264..46887bb332c 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -1356,6 +1356,7 @@ void 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 @@ uninterrupt_malloc () 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) |