aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/alloc.c b/src/alloc.c
index c49d3b5becc..fe13b84b5a7 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1,6 +1,6 @@
1/* Storage allocation and gc for GNU Emacs Lisp interpreter. 1/* Storage allocation and gc for GNU Emacs Lisp interpreter.
2 Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999, 2 Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999,
3 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -127,21 +127,21 @@ extern __malloc_size_t __malloc_extra_blocks;
127 127
128static pthread_mutex_t alloc_mutex; 128static pthread_mutex_t alloc_mutex;
129 129
130#define BLOCK_INPUT_ALLOC \ 130#define BLOCK_INPUT_ALLOC \
131 do \ 131 do \
132 { \ 132 { \
133 if (pthread_self () == main_thread) \ 133 if (pthread_equal (pthread_self (), main_thread)) \
134 BLOCK_INPUT; \ 134 BLOCK_INPUT; \
135 pthread_mutex_lock (&alloc_mutex); \ 135 pthread_mutex_lock (&alloc_mutex); \
136 } \ 136 } \
137 while (0) 137 while (0)
138#define UNBLOCK_INPUT_ALLOC \ 138#define UNBLOCK_INPUT_ALLOC \
139 do \ 139 do \
140 { \ 140 { \
141 pthread_mutex_unlock (&alloc_mutex); \ 141 pthread_mutex_unlock (&alloc_mutex); \
142 if (pthread_self () == main_thread) \ 142 if (pthread_equal (pthread_self (), main_thread)) \
143 UNBLOCK_INPUT; \ 143 UNBLOCK_INPUT; \
144 } \ 144 } \
145 while (0) 145 while (0)
146 146
147#else /* SYSTEM_MALLOC || not HAVE_GTK_AND_PTHREAD */ 147#else /* SYSTEM_MALLOC || not HAVE_GTK_AND_PTHREAD */