summaryrefslogtreecommitdiff
path: root/src/alloc.c
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2006-08-27 07:08:31 +0000
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2006-08-27 07:08:31 +0000
commitf3c4a0e1d28dcf59bf9b59ba040b361ad44adad3 (patch)
treece719ae98a155d8b1e6a8400c141f5d9c6a28933 /src/alloc.c
parent4442ec0d0dcc53489b071872800095a299559fba (diff)
downloademacs-f3c4a0e1d28dcf59bf9b59ba040b361ad44adad3.tar.gz
(BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Undo previous
change. Move mutex lock/unlock operations inside BLOCK_INPUT.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 192b974196f..2fd50009649 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -130,27 +130,17 @@ static pthread_mutex_t alloc_mutex;
#define BLOCK_INPUT_ALLOC \
do \
{ \
- if (!in_sighandler) \
- { \
- pthread_mutex_lock (&alloc_mutex); \
- if (pthread_self () == main_thread) \
- BLOCK_INPUT; \
- else \
- sigblock (sigmask (SIGIO)); \
- } \
+ if (pthread_self () == main_thread) \
+ BLOCK_INPUT; \
+ pthread_mutex_lock (&alloc_mutex); \
} \
while (0)
#define UNBLOCK_INPUT_ALLOC \
do \
{ \
- if (!in_sighandler) \
- { \
- pthread_mutex_unlock (&alloc_mutex); \
- if (pthread_self () == main_thread) \
- UNBLOCK_INPUT; \
- else \
- sigunblock (sigmask (SIGIO)); \
- } \
+ pthread_mutex_unlock (&alloc_mutex); \
+ if (pthread_self () == main_thread) \
+ UNBLOCK_INPUT; \
} \
while (0)