bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs-22.1 with GTK problems (with patches)


From: YAMAMOTO Mitsuharu
Subject: Re: emacs-22.1 with GTK problems (with patches)
Date: Fri, 14 Sep 2007 15:16:44 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.0.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Fri, 14 Sep 2007 08:06:19 +0200, Jan Djärv <jan.h.d@swipnet.se> said:

>> On Solaris 2.6 there is no recursive mutex support.
> Then we can not support that platform.  I can put in a configure
> test for recursive mutexes, but we have to fail with an error if
> there is no such thing.

What do you think about the change below?

(I asked the OP whether a similar change works in
http://lists.gnu.org/archive/html/bug-gnu-emacs/2007-09/msg00060.html,
but no reply yet. )

                             YAMAMOTO Mitsuharu
                        mituharu@math.s.chiba-u.ac.jp

Index: src/alloc.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/alloc.c,v
retrieving revision 1.415
diff -c -p -r1.415 alloc.c
*** src/alloc.c 29 Aug 2007 05:27:51 -0000      1.415
--- src/alloc.c 14 Sep 2007 06:09:50 -0000
*************** void
*** 1356,1361 ****
--- 1356,1362 ----
  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.
*************** uninterrupt_malloc ()
*** 1363,1368 ****
--- 1364,1374 ----
    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)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]