aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorJan Djärv2007-01-11 19:22:04 +0000
committerJan Djärv2007-01-11 19:22:04 +0000
commit959dc6015aa5cabb19bda9d29b69772298038a2f (patch)
tree036965ddbc41466b260ad48ec2bd1963c6a85ca7 /src/alloc.c
parent3a349573d8fc143a6164282e97f8624c1fd4f94d (diff)
downloademacs-959dc6015aa5cabb19bda9d29b69772298038a2f.tar.gz
emacs-959dc6015aa5cabb19bda9d29b69772298038a2f.zip
(BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Use pthread_equal,
block/unblock SIGIO.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/alloc.c b/src/alloc.c
index f3ca3e71a29..926d2706e8f 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -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 sigblock (sigmask (SIGIO)); \
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 sigunblock (sigmask (SIGIO)); \
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 */