mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-18 03:51:48 -07:00
(BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Undo previous
change. Move mutex lock/unlock operations inside BLOCK_INPUT.
This commit is contained in:
parent
4442ec0d0d
commit
f3c4a0e1d2
1 changed files with 6 additions and 16 deletions
22
src/alloc.c
22
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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue